diff --git a/thirdparty/3dxware_sdk/inc/SpaceMouse/CActionNode.hpp b/thirdparty/3dxware_sdk/inc/SpaceMouse/CActionNode.hpp
index b3d092faeb..859d14c39d 100644
--- a/thirdparty/3dxware_sdk/inc/SpaceMouse/CActionNode.hpp
+++ b/thirdparty/3dxware_sdk/inc/SpaceMouse/CActionNode.hpp
@@ -201,7 +201,7 @@ public:
base_type::next = next.release();
}
-#if !defined(__GNUC__) || defined(__clang__)
+#if USE_DECLSPEC_PROPERTY
///
/// The properties.
///
diff --git a/thirdparty/3dxware_sdk/inc/SpaceMouse/CHitTest.hpp b/thirdparty/3dxware_sdk/inc/SpaceMouse/CHitTest.hpp
index b2abbd161a..a2a89115fd 100644
--- a/thirdparty/3dxware_sdk/inc/SpaceMouse/CHitTest.hpp
+++ b/thirdparty/3dxware_sdk/inc/SpaceMouse/CHitTest.hpp
@@ -44,7 +44,7 @@ public:
CHitTest() : m_aperture(1), m_dirty(false), m_selectionOnly(false) {
}
-#if !defined(__GNUC__) || defined(__clang__)
+#if USE_DECLSPEC_PROPERTY
///
/// Property accessors
///
diff --git a/thirdparty/3dxware_sdk/inc/SpaceMouse/CImage.hpp b/thirdparty/3dxware_sdk/inc/SpaceMouse/CImage.hpp
index f2d83b3e1d..09f0d393dd 100644
--- a/thirdparty/3dxware_sdk/inc/SpaceMouse/CImage.hpp
+++ b/thirdparty/3dxware_sdk/inc/SpaceMouse/CImage.hpp
@@ -25,6 +25,7 @@
*/
// stdlib
+#include
#include
#include
@@ -39,9 +40,22 @@
#endif
#endif
-#ifndef _WIN32
-#define IS_INTRESOURCE(x) false
+///
+/// Determines whether a value is an integer identifier for a resource.
+///
+///
+/// The pointer to be tested whether it contains an integer resource identifier.
+///
+///
+/// true when id is an integer identifier for a resource, otherwise false when
+/// it is typically a pointer to a string
+__inline bool IsIntResource(const char *id) {
+#ifdef _WIN32
+ return ((reinterpret_cast(id)) >> 16) == 0;
+#else
+ return false;
#endif
+}
namespace TDx {
///
@@ -85,7 +99,7 @@ public:
}
}
-#if !defined(__GNUC__) || defined(__clang__)
+#if USE_DECLSPEC_PROPERTY
///
/// Gets or sets the image id.
///
@@ -181,7 +195,7 @@ public:
std::string r_id;
if (resourceId != nullptr) {
- if (IS_INTRESOURCE(resourceId)) {
+ if (IsIntResource(resourceId)) {
std::ostringstream stream;
stream << "#" << reinterpret_cast(resourceId);
r_id = stream.str();
@@ -192,7 +206,7 @@ public:
std::string r_type;
if (resourceType != nullptr) {
- if (IS_INTRESOURCE(resourceType)) {
+ if (IsIntResource(resourceType)) {
std::ostringstream stream;
stream << "#" << reinterpret_cast(resourceType);
r_type = stream.str();
diff --git a/thirdparty/3dxware_sdk/inc/SpaceMouse/CNavigation3D.hpp b/thirdparty/3dxware_sdk/inc/SpaceMouse/CNavigation3D.hpp
index 33d01040cb..73edac3ad3 100644
--- a/thirdparty/3dxware_sdk/inc/SpaceMouse/CNavigation3D.hpp
+++ b/thirdparty/3dxware_sdk/inc/SpaceMouse/CNavigation3D.hpp
@@ -106,7 +106,7 @@ public:
virtual ~CNavigation3D() {
}
-#if !defined(__GNUC__) || defined(__clang__)
+#if USE_DECLSPEC_PROPERTY
///
/// Gets or sets a value indicating whether the 3DMouse navigation is enabled.
///