File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ endif( MSVC )
9797
9898if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
9999 # using regular Clang or AppleClang
100- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" )
100+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wshorten-64-to-32 " )
101101elseif ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
102102 # using GCC
103103 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -pedantic" )
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ inline static void decodePrefixedString(
125125 unsigned * length, char const ** value)
126126{
127127 if (!isPrefixed) {
128- *length = strlen (prefixed);
128+ *length = static_cast < unsigned >( strlen (prefixed) );
129129 *value = prefixed;
130130 } else {
131131 *length = *reinterpret_cast <unsigned const *>(prefixed);
Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ void FastWriter::writeValue(const Value& value) {
354354 const std::string& name = *it;
355355 if (it != members.begin ())
356356 document_ += ' ,' ;
357- document_ += valueToQuotedStringN (name.data (), name.length ());
357+ document_ += valueToQuotedStringN (name.data (), static_cast < unsigned >( name.length () ));
358358 document_ += yamlCompatiblityEnabled_ ? " : " : " :" ;
359359 writeValue (value[name]);
360360 }
@@ -914,7 +914,7 @@ void BuiltStyledStreamWriter::writeValue(Value const& value) {
914914 std::string const & name = *it;
915915 Value const & childValue = value[name];
916916 writeCommentBeforeValue (childValue);
917- writeWithIndent (valueToQuotedStringN (name.data (), name.length ()));
917+ writeWithIndent (valueToQuotedStringN (name.data (), static_cast < unsigned >( name.length () )));
918918 *sout_ << colonSymbol_;
919919 writeValue (childValue);
920920 if (++it == members.end ()) {
You can’t perform that action at this time.
0 commit comments