MSVC: remove hack for near/far name collision
authorCampbell Barton <ideasman42@gmail.com>
Wed, 9 May 2018 08:00:55 +0000 (10:00 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 9 May 2018 08:00:55 +0000 (10:00 +0200)
windows headers define these, conflicting w/ View3D.near/far.

source/blender/makesdna/DNA_view3d_types.h
source/blender/windowmanager/intern/wm_init_exit.c

index b9894d46b5b7bb3461de31de9f58b992d3eac3e7..5169657206c6ff163dbb3693f29cb8edc0e9567a 100644 (file)
@@ -46,15 +46,6 @@ struct wmTimer;
 struct Material;
 struct GPUFX;
 
-/* This is needed to not let VC choke on near and far... old
- * proprietary MS extensions... */
-#ifdef WIN32
-#undef near
-#undef far
-#define near clipsta
-#define far clipend
-#endif
-
 #include "DNA_defs.h"
 #include "DNA_listBase.h"
 #include "DNA_image_types.h"
index 52682523212a777f1096386af5abf54139f145fd..912809c7ab9167f7efaf145eb0cc83fc9d80f4b9 100644 (file)
@@ -36,6 +36,8 @@
 
 #ifdef WIN32
 #  include <windows.h>
+#  undef near
+#  undef far
 #endif
 
 #include "MEM_guardedalloc.h"