From 05e8b22989feb1bb59b5113caefcd615aa2bd5b5 Mon Sep 17 00:00:00 2001 From: Nicolas Schneider Date: Wed, 3 Jun 2020 13:44:16 +0200 Subject: [PATCH] fix cast warning (#512) --- httplib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/httplib.h b/httplib.h index cc36a28..0108ee4 100644 --- a/httplib.h +++ b/httplib.h @@ -1543,7 +1543,7 @@ inline void read_file(const std::string &path, std::string &out) { auto size = fs.tellg(); fs.seekg(0); out.resize(static_cast(size)); - fs.read(&out[0], size); + fs.read(&out[0], static_cast(size)); } inline std::string file_extension(const std::string &path) { @@ -2929,8 +2929,8 @@ private: std::string buf_; size_t state_ = 0; - size_t is_valid_ = false; - size_t is_done_ = false; + bool is_valid_ = false; + bool is_done_ = false; size_t off_ = 0; MultipartFormData file_; };