Skip to content

Commit 6ca8238

Browse files
committed
xrPhysics: fix linkage internal virtal destructors on Windows
1 parent b9274fc commit 6ca8238

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

src/xrPhysics/IColisiondamageInfo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class ICollisionDamageInfo
1818
virtual bool GetAndResetInitiated() = 0;
1919

2020
protected:
21+
#if defined(WINDOWS)
22+
virtual ~ICollisionDamageInfo() = 0 {}
23+
#elif defined(LINUX)
2124
virtual ~ICollisionDamageInfo() = 0;
25+
#endif
2226
};
2327
#endif

src/xrPhysics/IElevatorState.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@ class IElevatorState
1919
virtual void NetRelcase(IPhysicsShellHolder* O) = 0;
2020

2121
protected:
22+
#if defined(WINDOWS)
23+
virtual ~IElevatorState() = 0 {}
24+
#elif defined(LINUX)
2225
virtual ~IElevatorState() = 0;
26+
#endif
2327
};

src/xrPhysics/IPHCapture.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ class IPHCapture
88
virtual void Release() = 0;
99

1010
protected:
11+
#if defined(WINDOWS)
12+
virtual ~IPHCapture() = 0 {}
13+
#elif defined(LINUX)
1114
virtual ~IPHCapture() = 0;
15+
#endif
1216
};
1317
class CPHCharacter;
1418
struct NearestToPointCallback;

src/xrPhysics/IPHStaticGeomShell.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
class IPHStaticGeomShell
44
{
55
protected:
6+
#if defined(WINDOWS)
7+
virtual ~IPHStaticGeomShell() = 0 {}
8+
#elif defined(LINUX)
69
virtual ~IPHStaticGeomShell() = 0;
10+
#endif
11+
712
// virtual void set_ObjectContactCallback (ObjectContactCallbackFun* callback);
813
};
914

src/xrPhysics/iphysics_scripted.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ class iphysics_scripted_class
3232
#ifdef _EDITOR
3333
virtual ~iphysics_scripted_class() {}
3434
#else
35+
#if defined(WINDOWS)
36+
virtual ~iphysics_scripted_class() = 0 {}
37+
#elif defined(LINUX)
3538
virtual ~iphysics_scripted_class() = 0;
3639
#endif
40+
#endif
3741
};
3842

3943
namespace non_copy

0 commit comments

Comments
 (0)