Skip to content

Commit d560068

Browse files
committed
linux build: add MSDN COM __interface replacement
1 parent 0ad7e6b commit d560068

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/xrCore/_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,7 @@ using string_path = char[2 * max_path];
7272
// XXX: Replace __interface with either struct or class. MS defines it as struct for COM, but this project is C++.
7373
#if defined(WINDOWS)
7474
#define xr_pure_interface __interface
75+
#elif defined(LINUX)
76+
#define xr_pure_interface struct
7577
#endif
7678
#endif

src/xrEngine/xr_object.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class CInifile;
2626
#define CROW_RADIUS2 (60.f)
2727

2828
class IPhysicsShell;
29-
#if defined(WINDOWS)
3029
xr_pure_interface IObjectPhysicsCollision;
31-
#endif
3230

3331
class CAttachmentOwner;
3432
class CInventoryOwner;
@@ -188,9 +186,7 @@ class IGameObject : public virtual IFactoryObject,
188186
virtual IRenderVisual* Visual() const = 0;
189187
virtual void OnChangeVisual() = 0;
190188
virtual IPhysicsShell* physics_shell() = 0;
191-
#if defined(WINDOWS)
192189
virtual const IObjectPhysicsCollision* physics_collision() = 0;
193-
#endif
194190
// Name management
195191
virtual shared_str cName() const = 0;
196192
virtual void cName_set(shared_str N) = 0;

src/xrGame/PhysicsShellHolder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CPhysicsShellHolder : public CGameObject,
4747
virtual bool ActivationSpeedOverriden(Fvector& dest, bool clear_override) { return false; }
4848
IC CPhysicsShell*& PPhysicsShell() { return m_pPhysicsShell; }
4949
IC CPhysicsShellHolder* PhysicsShellHolder() { return this; }
50-
virtual const IObjectPhysicsCollision* physics_collision();
50+
virtual const IObjectPhysicsCollision* physics_collision() {}
5151
virtual const IPhysicsShell* physics_shell() const;
5252
virtual IPhysicsShell* physics_shell();
5353
virtual const IPhysicsElement* physics_character() const;

0 commit comments

Comments
 (0)