diff --git a/WebApp/WebApp/WebApp.vcxproj b/WebApp/WebApp/WebApp.vcxproj index 0e9933b..b9c02ee 100644 --- a/WebApp/WebApp/WebApp.vcxproj +++ b/WebApp/WebApp/WebApp.vcxproj @@ -116,7 +116,7 @@ true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true - stdcpp20 + stdcpp17 ..\..\dependencies\inja\include;..\..\dependencies\inja\third_party\include;..\bserv\include;..\..\dependencies\libpqxx\include;..\..\dependencies;..\..\dependencies\boost;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) diff --git a/WebApp/WebApp/rendering.cpp b/WebApp/WebApp/rendering.cpp index 79bae51..6d03cfd 100644 --- a/WebApp/WebApp/rendering.cpp +++ b/WebApp/WebApp/rendering.cpp @@ -69,8 +69,11 @@ mime_type(boost::beast::string_view path) { std::string read_bin(const std::string& file) { std::ifstream fin(file, std::ios_base::in | std::ios_base::binary); std::string res; - char c; - while ((c = (char)fin.get()) != EOF) res += c; + while (true) { + char c = (char)fin.get(); + if (fin.eof()) break; + res += c; + } return res; } diff --git a/WebApp/bserv/bserv.vcxproj b/WebApp/bserv/bserv.vcxproj index 2055f2b..c96093d 100644 --- a/WebApp/bserv/bserv.vcxproj +++ b/WebApp/bserv/bserv.vcxproj @@ -127,7 +127,7 @@ Use pch.h ..\..\dependencies\libpqxx\include;..\..\dependencies;..\..\dependencies\boost;include;%(AdditionalIncludeDirectories) - stdcpp20 + stdcpp17 /bigobj %(AdditionalOptions)