From 4ae83890ce3a82e1f9a716971aaa69591f0cf6cb Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 26 Sep 2024 16:51:10 +0200 Subject: Fix enum sizes proposed by clang-tidy. Enable performance-enum-size check. --- src/buildtool/file_system/file_system_manager.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/buildtool/file_system/file_system_manager.hpp') 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 // for errno #include #include +#include #include // for std::fopen #include // std::exit, std::getenv #include @@ -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 -- cgit v1.2.3