summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/file_system_manager.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-26 16:51:10 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-26 16:54:21 +0200
commit4ae83890ce3a82e1f9a716971aaa69591f0cf6cb (patch)
treedac323622558073c89fcbd892da02af0cfc453ac /src/buildtool/file_system/file_system_manager.hpp
parent5baab75fd2ae62b6f6407991922fe234f9e73c88 (diff)
downloadjustbuild-4ae83890ce3a82e1f9a716971aaa69591f0cf6cb.tar.gz
Fix enum sizes proposed by clang-tidy.
Enable performance-enum-size check.
Diffstat (limited to 'src/buildtool/file_system/file_system_manager.hpp')
-rw-r--r--src/buildtool/file_system/file_system_manager.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp
index 514fadd2..f035e407 100644
--- a/src/buildtool/file_system/file_system_manager.hpp
+++ b/src/buildtool/file_system/file_system_manager.hpp
@@ -19,6 +19,7 @@
#include <cerrno> // for errno
#include <chrono>
#include <cstddef>
+#include <cstdint>
#include <cstdio> // for std::fopen
#include <cstdlib> // std::exit, std::getenv
#include <cstring>
@@ -984,7 +985,7 @@ class FileSystemManager {
}
private:
- enum class CreationStatus { Created, Exists, Failed };
+ enum class CreationStatus : std::uint8_t { Created, Exists, Failed };
static constexpr std::size_t kChunkSize{256};
@@ -1287,7 +1288,7 @@ class FileSystemManager {
}
private:
- enum ErrorCodes {
+ enum ErrorCodes : std::uint8_t {
ERROR_READ_INPUT, // read() input file failed
ERROR_OPEN_INPUT, // open() input file failed
ERROR_OPEN_OUTPUT, // open() output file failed