Mute the sign conversion warning with explicit cast

This commit is contained in:
Teskann 2022-10-08 23:12:21 +02:00 committed by Martin Hořeňovský
parent 728de353be
commit bdf30834eb
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}