Skip to content

Commit

Permalink
Mute the sign conversion warning with explicit cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Teskann authored and horenmar committed Oct 9, 2022
1 parent 728de35 commit bdf3083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/catch2/catch_tostring.hpp
Expand Up @@ -43,7 +43,7 @@ namespace Catch {
inline std::size_t catch_strnlen(const char *str, std::size_t n) {
auto ret = std::char_traits<char>::find(str, n, '\0');
if (ret != nullptr) {
return ret - str;
return static_cast<std::size_t>(ret - str);
}
return n;
}
Expand Down

0 comments on commit bdf3083

Please sign in to comment.