mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 17:37:15 +00:00
Fix clang-tidy and clang 3.4/3.5 failures in the custom number type changes
Parenthesize n % 10 in integer_to_string for readability-math-missing-parentheses, and give class_int non-template constructors (as absl::int128 has): clang 3.4 and 3.5 reject the defaulted basic_json::data() constructor for a number type with template constructors. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
3 files changed
+13
-8
No files matched your search
@@ -920,7 +920,7 @@ class binary_writer
|
||||
std::string result;
|
||||
do
|
||||
{
|
||||
result.push_back(static_cast<char>('0' + n % 10));
|
||||
result.push_back(static_cast<char>('0' + (n % 10)));
|
||||
n = static_cast<NumberType>(n / 10);
|
||||
}
|
||||
while (n != 0);
|
||||
|
||||
Reference in new issue
Block a user