diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-26 10:38:25 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-26 10:58:36 +0300 |
commit | 333e41eac6daf60c6aa9df0496a39c57d74b9c87 (patch) | |
tree | 5986e980fd64bc4ef1c3dda125a0f9dca4bab2c8 /source/blender/blenlib/BLI_string_ref.hh | |
parent | 0210c4df1793799a09a35e44be286dfca88769dc (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Use function style casts in C++ headers & source.
Diffstat (limited to 'source/blender/blenlib/BLI_string_ref.hh')
-rw-r--r-- | source/blender/blenlib/BLI_string_ref.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh index b202769e3c3..14dee54d730 100644 --- a/source/blender/blenlib/BLI_string_ref.hh +++ b/source/blender/blenlib/BLI_string_ref.hh @@ -585,7 +585,7 @@ inline std::ostream &operator<<(std::ostream &stream, StringRef ref) inline std::ostream &operator<<(std::ostream &stream, StringRefNull ref) { - stream << std::string(ref.data(), (size_t)ref.size()); + stream << std::string(ref.data(), size_t(ref.size())); return stream; } @@ -611,7 +611,7 @@ constexpr bool operator==(StringRef a, StringRef b) /* This also avoids passing null to the call below, which would results in an ASAN warning. */ return true; } - return STREQLEN(a.data(), b.data(), (size_t)a.size()); + return STREQLEN(a.data(), b.data(), size_t(a.size())); } constexpr bool operator!=(StringRef a, StringRef b) |