diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 8fbce54..cc7d4d3 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -125,7 +125,7 @@ inline static void decodePrefixedString( unsigned* length, char const** value) { if (!isPrefixed) { - *length = strlen(prefixed); + *length = static_cast(strlen(prefixed)); *value = prefixed; } else { *length = *reinterpret_cast(prefixed); diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index 3be34d9..2f940c8 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -354,7 +354,7 @@ void FastWriter::writeValue(const Value& value) { const std::string& name = *it; if (it != members.begin()) document_ += ','; - document_ += valueToQuotedStringN(name.data(), name.length()); + document_ += valueToQuotedStringN(name.data(), static_cast(name.length())); document_ += yamlCompatiblityEnabled_ ? ": " : ":"; writeValue(value[name]); } @@ -914,7 +914,7 @@ void BuiltStyledStreamWriter::writeValue(Value const& value) { std::string const& name = *it; Value const& childValue = value[name]; writeCommentBeforeValue(childValue); - writeWithIndent(valueToQuotedStringN(name.data(), name.length())); + writeWithIndent(valueToQuotedStringN(name.data(), static_cast(name.length()))); *sout_ << colonSymbol_; writeValue(childValue); if (++it == members.end()) {