diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/archive/archive_ops.cpp | 4 | ||||
-rw-r--r-- | src/utils/archive/archive_ops.hpp | 3 | ||||
-rw-r--r-- | src/utils/cpp/hex_string.hpp | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/utils/archive/archive_ops.cpp b/src/utils/archive/archive_ops.cpp index d8363b76..59b1d8a0 100644 --- a/src/utils/archive/archive_ops.cpp +++ b/src/utils/archive/archive_ops.cpp @@ -27,7 +27,7 @@ extern "C" { namespace { /// \brief Default block size for archive extraction. -constexpr size_t kArchiveBlockSize = 10240; +constexpr std::size_t kArchiveBlockSize = 10240; /// \brief Clean-up function for archive entry objects. void archive_entry_cleanup(archive_entry* entry) { @@ -120,7 +120,7 @@ auto ArchiveOps::CopyData(archive* ar, archive* aw) #ifndef BOOTSTRAP_BUILD_TOOL int r{}; const void* buff{nullptr}; - size_t size{}; + std::size_t size{}; la_int64_t offset{}; while (true) { diff --git a/src/utils/archive/archive_ops.hpp b/src/utils/archive/archive_ops.hpp index 933bb814..89151790 100644 --- a/src/utils/archive/archive_ops.hpp +++ b/src/utils/archive/archive_ops.hpp @@ -15,6 +15,7 @@ #ifndef INCLUDED_SRC_UTILS_ARCHIVE_ARCHIVE_OPS_HPP #define INCLUDED_SRC_UTILS_ARCHIVE_ARCHIVE_OPS_HPP +#include <cstddef> #include <filesystem> #include <optional> @@ -25,7 +26,7 @@ using archive = struct archive; using archive_entry = struct archive_entry; } -enum class ArchiveType : size_t { +enum class ArchiveType : std::size_t { Zip, _7Zip, ZipAuto, // autodetect zip-like archives 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; |