Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Cppcheck fixes #1760
This Pull Request corrects two of the warnings reported by cppcheck, mentionned in #1759
A warning about an unnecessary check in the first commit, and a warning about a code enhancement in the second warning, by using the std::accumulate function instead of a raw loop.
Pull request checklist
Read the Contribution Guidelines for detailed information.
binary_reader.hpp:650: (style) Unsigned expression 'mant' can't be negative so it is unnecessary to test it https://github.com/Xav83/nlohmann-json-cppcheck/commit/910a7d2b873dd7ae92ec81cced2bf73200ff4848/checks#step:5:84 Signed-off-by: Xav83 <email@example.com>
binary_writer.hpp:869: (style) Consider using std::accumulate algorithm instead of a raw loop. https://github.com/Xav83/nlohmann-json-cppcheck/commit/910a7d2b873dd7ae92ec81cced2bf73200ff4848/checks#step:5:107 Signed-off-by: Xav83 <firstname.lastname@example.org>