diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-04-08 13:18:22 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-04-08 15:19:50 +0200 |
commit | 277be6dd08633dbebfda93afdfc6b5cb57e053e0 (patch) | |
tree | 6c86157c7f93636459361264054753a1dc9d33e9 /src/utils/cpp | |
parent | 419a458ad9d4383eb47d51fe8e4408a0e240c2f1 (diff) | |
download | justbuild-277be6dd08633dbebfda93afdfc6b5cb57e053e0.tar.gz |
Use properly included standard library types by default
Diffstat (limited to 'src/utils/cpp')
-rw-r--r-- | src/utils/cpp/hex_string.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/cpp/hex_string.hpp b/src/utils/cpp/hex_string.hpp index 44e0adf6..23544d49 100644 --- a/src/utils/cpp/hex_string.hpp +++ b/src/utils/cpp/hex_string.hpp @@ -15,6 +15,7 @@ #ifndef INCLUDED_SRC_UTILS_CPP_HEX_STRING_HPP #define INCLUDED_SRC_UTILS_CPP_HEX_STRING_HPP +#include <cstddef> #include <iomanip> #include <iostream> #include <optional> @@ -35,9 +36,9 @@ [[nodiscard]] static inline auto FromHexString(std::string const& hexstring) -> std::optional<std::string> { try { - const size_t kHexBase = 16; + const std::size_t kHexBase = 16; std::stringstream ss{}; - for (size_t i = 0; i < hexstring.length(); i += 2) { + for (std::size_t i = 0; i < hexstring.length(); i += 2) { unsigned char c = std::stoul(hexstring.substr(i, 2), nullptr, kHexBase); ss << c; |