diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-11 19:15:18 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-11 21:48:37 +0100 |
commit | e166206702c8dbd3162452cf26f368e856ac0138 (patch) | |
tree | e4e659fc91b0a47f04755b6298b8085370aefc8d /src/util.cc | |
parent | 936fb83eec4038a48e6e42f9f5d93677dc216ab4 (diff) |
More clang-tidy fixes and increase warning level (and fix them)
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cc b/src/util.cc index 76d380b..73b158d 100644 --- a/src/util.cc +++ b/src/util.cc @@ -22,10 +22,10 @@ std::string readFile(const std::string& fileName) std::ifstream::pos_type fileSize = ifs.tellg(); ifs.seekg(0, std::ios::beg); - std::vector<char> bytes(fileSize); + std::vector<char> bytes(static_cast<std::size_t>(fileSize)); ifs.read(bytes.data(), fileSize); - return std::string(bytes.data(), fileSize); + return {bytes.data(), static_cast<std::size_t>(fileSize)}; } std::vector<std::string> readDeps(const std::string& depFile) |