From 277be6dd08633dbebfda93afdfc6b5cb57e053e0 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 8 Apr 2024 13:18:22 +0200 Subject: Use properly included standard library types by default --- src/utils/cpp/hex_string.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/utils/cpp/hex_string.hpp') 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 #include #include #include @@ -35,9 +36,9 @@ [[nodiscard]] static inline auto FromHexString(std::string const& hexstring) -> std::optional { 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; -- cgit v1.2.3