diff options
| author | Teskann | 2022-10-08 23:12:21 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-10-09 19:02:32 +0200 |
| commit | bdf30834ebe352310f31bb16382484f828ccbf0b (patch) | |
| tree | 8d4cc5dff51cc466aa239e0699ebc6590b512129 /src | |
| parent | 728de353be6a6d3658932bfc8e1ea5c7742a61c6 (diff) | |
| download | catch3-bdf30834ebe352310f31bb16382484f828ccbf0b.tar.gz | |
Mute the sign conversion warning with explicit cast
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/catch_tostring.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp index 65c6c13e..8ff236e4 100644 --- a/src/catch2/catch_tostring.hpp +++ b/src/catch2/catch_tostring.hpp @@ -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; } |