fix bug: WebApp: rendering: read_bin: eof & change std to c++17
This commit is contained in:
parent
1ae2bfd5aa
commit
e2ad5f9619
|
@ -116,7 +116,7 @@
|
|||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>..\..\dependencies\inja\include;..\..\dependencies\inja\third_party\include;..\bserv\include;..\..\dependencies\libpqxx\include;..\..\dependencies;..\..\dependencies\boost;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>..\..\dependencies\libpqxx\include;..\..\dependencies;..\..\dependencies\boost;include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
|
Loading…
Reference in New Issue