From be04bf1302ab58401cb96331399cd27ab6787c45 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Thu, 20 Jun 2019 23:58:35 +0900 Subject: [PATCH] refactor: convert file size to size_t --- toml/parser.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index 8e8a7ef..a7cf57e 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -1939,7 +1939,8 @@ parse(std::istream& is, const std::string& fname = "unknown file") is.seekg(beg); // read whole file as a sequence of char - std::vector letters(fsize); + assert(fsize >= 0); + std::vector letters(static_cast(fsize)); is.read(letters.data(), fsize); detail::location>