mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Mute the sign conversion warning with explicit cast
This commit is contained in:
parent
728de353be
commit
bdf30834eb
@ -43,7 +43,7 @@ namespace Catch {
|
|||||||
inline std::size_t catch_strnlen(const char *str, std::size_t n) {
|
inline std::size_t catch_strnlen(const char *str, std::size_t n) {
|
||||||
auto ret = std::char_traits<char>::find(str, n, '\0');
|
auto ret = std::char_traits<char>::find(str, n, '\0');
|
||||||
if (ret != nullptr) {
|
if (ret != nullptr) {
|
||||||
return ret - str;
|
return static_cast<std::size_t>(ret - str);
|
||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user