Skip to content

Commit 6e9cce1

Browse files
committed
Fixing compilability under VS 2012
1 parent cd4afc3 commit 6e9cce1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ else (UNIX)
294294
endif()
295295
endif()
296296

297+
if (NOT (MSVC_VERSION LESS 1700))
298+
add_definitions(/D_ALLOW_KEYWORD_MACROS)
299+
endif()
297300
endif()
298301

299302
if (GAME_DEVICE_SUPPORT)

src/lib/common/common.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,12 @@
142142
// we don't want to use NULL since it's old and nasty, so replace any
143143
// usages with nullptr (warning: this could break many things).
144144
// if not c++0x yet, future proof code by allowing use of nullptr
145-
#ifdef nullptr
146-
#define NULL nullptr
147-
#else
148-
#define nullptr NULL
145+
#if !(defined(_MSC_VER) && _MSC_VER >= 1700)
146+
# ifdef nullptr
147+
# define NULL nullptr
148+
# else
149+
# define nullptr NULL
150+
# endif
149151
#endif
150152

151153
// make assert available since we use it a lot

src/lib/platform/CMSWindowsScreen.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include "CArch.h"
3838
#include "CArchMiscWindows.h"
3939
#include <string.h>
40-
#include <pbt.h>
4140

4241
//
4342
// add backwards compatible multihead support (and suppress bogus warning).

0 commit comments

Comments
 (0)