dmuratshin 9 سال پیش
والد
کامیت
a84f59c1c2
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 1 1
      oxygine/src/EventDispatcher.h
  2. 4 0
      oxygine/src/oxygine_include.h

+ 1 - 1
oxygine/src/EventDispatcher.h

@@ -12,7 +12,7 @@ namespace oxygine
 
 #define makefourcc(a,b,c,d) ( ((unsigned int)a) | (((unsigned int)b)<< 8) | (((unsigned int)c)<<16) | (((unsigned int)d)<<24))
 
-#if __cplusplus > 199711L
+#ifdef OX_HAS_CPP11
     inline int error_eventID_should_be_size_of_4_chars(int x) { return x; }
     constexpr size_t constStringLength(const char* str) { return (*str == 0) ? 0 : constStringLength(str + 1) + 1; }
     constexpr int EventIDc11(const char *str) { return constStringLength(str) == 4 ? makefourcc(str[0], str[1], str[2], str[3]) : error_eventID_should_be_size_of_4_chars(0); }

+ 4 - 0
oxygine/src/oxygine_include.h

@@ -147,6 +147,10 @@ typedef signed long long int64;
 #endif
 
 
+#if !defined(__S3E__) && (defined(_MSC_VER) || (__cplusplus > 199711L))
+#define OX_HAS_CPP11
+#endif
+
 namespace oxygine
 {
     enum error_policy