Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTeskann2022-10-08 23:12:21 +0200
committerMartin Hořeňovský2022-10-09 19:02:32 +0200
commitbdf30834ebe352310f31bb16382484f828ccbf0b (patch)
tree8d4cc5dff51cc466aa239e0699ebc6590b512129 /src
parent728de353be6a6d3658932bfc8e1ea5c7742a61c6 (diff)
downloadcatch3-bdf30834ebe352310f31bb16382484f828ccbf0b.tar.gz
Mute the sign conversion warning with explicit cast
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_tostring.hpp2
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;
}