From f57a3f9cde5f78c992a65e4825071e6fb3264798 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Jul 2017 11:13:02 +0200 Subject: [PATCH] Hack to remove build warning on MSVC 2010 Fixes LP #1700329 --- dtool/src/dtoolbase/dtoolbase_cc.h | 4 ++++ panda/src/express/pointerTo.h | 4 ++-- panda/src/express/pointerToBase.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index f4fb89015c..7ccca03e24 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -34,6 +34,7 @@ using namespace std; #define ALWAYS_INLINE inline #define TYPENAME typename #define CONSTEXPR constexpr +#define ALWAYS_INLINE_CONSTEXPR constexpr #define NOEXCEPT noexcept #define FINAL final #define OVERRIDE override @@ -231,6 +232,9 @@ template typename remove_reference::type &&move(T &&t) { // Fallbacks if features are not supported #ifndef CONSTEXPR # define CONSTEXPR INLINE +# define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE +#else +# define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE CONSTEXPR #endif #ifndef NOEXCEPT # define NOEXCEPT diff --git a/panda/src/express/pointerTo.h b/panda/src/express/pointerTo.h index 15dbcdefb0..62abdf8e57 100644 --- a/panda/src/express/pointerTo.h +++ b/panda/src/express/pointerTo.h @@ -70,7 +70,7 @@ class PointerTo : public PointerToBase { public: typedef TYPENAME PointerToBase::To To; PUBLISHED: - ALWAYS_INLINE CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR; + ALWAYS_INLINE_CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR; ALWAYS_INLINE PointerTo(To *ptr) NOEXCEPT; INLINE PointerTo(const PointerTo ©); @@ -133,7 +133,7 @@ class ConstPointerTo : public PointerToBase { public: typedef TYPENAME PointerToBase::To To; PUBLISHED: - ALWAYS_INLINE CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR; + ALWAYS_INLINE_CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR; ALWAYS_INLINE ConstPointerTo(const To *ptr) NOEXCEPT; INLINE ConstPointerTo(const PointerTo ©); INLINE ConstPointerTo(const ConstPointerTo ©); diff --git a/panda/src/express/pointerToBase.h b/panda/src/express/pointerToBase.h index 4263312daa..7d5524f2b9 100644 --- a/panda/src/express/pointerToBase.h +++ b/panda/src/express/pointerToBase.h @@ -31,7 +31,7 @@ public: typedef T To; protected: - ALWAYS_INLINE CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR; + ALWAYS_INLINE_CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR; INLINE PointerToBase(To *ptr); INLINE PointerToBase(const PointerToBase ©); INLINE ~PointerToBase();