From b6f0f7a81675f420651ebed50a9c68b517ca79bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Sun, 21 Jul 2024 13:18:03 +0200 Subject: [PATCH] read_file: fix warnings --- include/utl/read_file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }