Browse Source

Hack to remove build warning on MSVC 2010
Fixes LP #1700329

rdb 8 years ago
parent
commit
f57a3f9cde

+ 4 - 0
dtool/src/dtoolbase/dtoolbase_cc.h

@@ -34,6 +34,7 @@ using namespace std;
 #define ALWAYS_INLINE inline
 #define ALWAYS_INLINE inline
 #define TYPENAME typename
 #define TYPENAME typename
 #define CONSTEXPR constexpr
 #define CONSTEXPR constexpr
+#define ALWAYS_INLINE_CONSTEXPR constexpr
 #define NOEXCEPT noexcept
 #define NOEXCEPT noexcept
 #define FINAL final
 #define FINAL final
 #define OVERRIDE override
 #define OVERRIDE override
@@ -231,6 +232,9 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
 // Fallbacks if features are not supported
 // Fallbacks if features are not supported
 #ifndef CONSTEXPR
 #ifndef CONSTEXPR
 #  define CONSTEXPR INLINE
 #  define CONSTEXPR INLINE
+#  define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE
+#else
+#  define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE CONSTEXPR
 #endif
 #endif
 #ifndef NOEXCEPT
 #ifndef NOEXCEPT
 #  define NOEXCEPT
 #  define NOEXCEPT

+ 2 - 2
panda/src/express/pointerTo.h

@@ -70,7 +70,7 @@ class PointerTo : public PointerToBase<T> {
 public:
 public:
   typedef TYPENAME PointerToBase<T>::To To;
   typedef TYPENAME PointerToBase<T>::To To;
 PUBLISHED:
 PUBLISHED:
-  ALWAYS_INLINE CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR;
+  ALWAYS_INLINE_CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR;
   ALWAYS_INLINE PointerTo(To *ptr) NOEXCEPT;
   ALWAYS_INLINE PointerTo(To *ptr) NOEXCEPT;
   INLINE PointerTo(const PointerTo<T> &copy);
   INLINE PointerTo(const PointerTo<T> &copy);
 
 
@@ -133,7 +133,7 @@ class ConstPointerTo : public PointerToBase<T> {
 public:
 public:
   typedef TYPENAME PointerToBase<T>::To To;
   typedef TYPENAME PointerToBase<T>::To To;
 PUBLISHED:
 PUBLISHED:
-  ALWAYS_INLINE CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR;
+  ALWAYS_INLINE_CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR;
   ALWAYS_INLINE ConstPointerTo(const To *ptr) NOEXCEPT;
   ALWAYS_INLINE ConstPointerTo(const To *ptr) NOEXCEPT;
   INLINE ConstPointerTo(const PointerTo<T> &copy);
   INLINE ConstPointerTo(const PointerTo<T> &copy);
   INLINE ConstPointerTo(const ConstPointerTo<T> &copy);
   INLINE ConstPointerTo(const ConstPointerTo<T> &copy);

+ 1 - 1
panda/src/express/pointerToBase.h

@@ -31,7 +31,7 @@ public:
   typedef T To;
   typedef T To;
 
 
 protected:
 protected:
-  ALWAYS_INLINE CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR;
+  ALWAYS_INLINE_CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR;
   INLINE PointerToBase(To *ptr);
   INLINE PointerToBase(To *ptr);
   INLINE PointerToBase(const PointerToBase<T> &copy);
   INLINE PointerToBase(const PointerToBase<T> &copy);
   INLINE ~PointerToBase();
   INLINE ~PointerToBase();