diff options
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) |