diff --git a/include/utl/read_file.h b/include/utl/read_file.h index 905003e..4e8ac09 100644 --- a/include/utl/read_file.h +++ b/include/utl/read_file.h @@ -14,10 +14,10 @@ inline std::optional read_file(char const* path) { f.seekg(0, std::ios::beg); std::string buffer; - buffer.resize(size); + buffer.resize(static_cast(size)); return f.read(&buffer[0], size) ? std::make_optional(buffer) : std::nullopt; - } catch (std::exception const& e) { + } catch (std::exception const&) { return std::nullopt; } }