1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 10:45:16 +01:00

Enable all C++ features for MSVC

This commit is contained in:
Ted John
2016-12-16 01:19:41 +00:00
committed by GitHub
parent 2e674b9202
commit c8dbc24ceb
3 changed files with 6 additions and 2 deletions

View File

@@ -36,7 +36,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatSpecificWarningsAsErrors>4013</TreatSpecificWarningsAsErrors>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/utf-8</AdditionalOptions>
<AdditionalOptions>/utf-8 /std:c++latest</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;version.lib;winmm.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>

View File

@@ -76,11 +76,12 @@ typedef uint8 colour_t;
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#endif // __cplusplus
#define sgn(x) ((x > 0) ? 1 : ((x < 0) ? -1 : 0))
#define clamp(l, x, h) (min(h, max(l, x)))
#endif // __cplusplus
// Rounds an integer down to the given power of 2. y must be a power of 2.
#define floor2(x, y) ((x) & (~((y) - 1)))

View File

@@ -37,6 +37,9 @@
<LibraryPath>$(SolutionDir)bin;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>GTEST_LANG_CXX11;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>openrct2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>