Fix compiler warning -Wstring-plus-int

Warning was as follows:

  src/tex2lyx/Parser.cpp:898:39: error: adding 'uint32_t' (aka 'unsigned int') to a string does not append to the string [-Werror,-Wstring-plus-int]
                  warning_message("ignoring a char: " + static_cast<uint32_t>(c));
                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
  src/tex2lyx/Parser.cpp:898:39: note: use array indexing to silence this warning
                  warning_message("ignoring a char: " + static_cast<uint32_t>(c));
                                                      ^
                                  &                   [                         ]
  1 error generated.
This commit is contained in:
Scott Kostyshak 2022-12-28 21:56:18 -05:00
parent 0faead1719
commit d44eaa9713

View File

@ -895,7 +895,7 @@ void Parser::tokenize_one()
}
case catIgnore: {
warning_message("ignoring a char: " + static_cast<uint32_t>(c));
warning_message("ignoring a char: " + std::to_string(static_cast<uint32_t>(c)));
break;
}