Skip to content

Commit dcb8fe8

Browse files
committed
xrGame: inherited typedef usage fix
1 parent a826f66 commit dcb8fe8

File tree

10 files changed

+37
-19
lines changed

10 files changed

+37
-19
lines changed

src/xrGame/ActorEffector.h

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ class CActor;
88

99
class CActorCameraManager : public CCameraManager
1010
{
11-
typedef CCameraManager inherited;
12-
1311
SCamEffectorInfo m_cam_info_hud;
1412

1513
protected:
14+
using inherited = CCameraManager;
15+
1616
virtual void UpdateCamEffectors();
1717
virtual bool ProcessCameraEffector(CEffectorCam* eff);
1818

@@ -51,10 +51,11 @@ class CEffectorController
5151

5252
class CAnimatorCamEffector : public CEffectorCam
5353
{
54-
typedef CEffectorCam inherited;
5554
bool m_bCyclic;
5655

5756
protected:
57+
using inherited = CEffectorCam;
58+
5859
virtual bool Cyclic() const { return m_bCyclic; }
5960
CObjectAnimator* m_objectAnimator;
6061

@@ -74,10 +75,11 @@ class CAnimatorCamEffector : public CEffectorCam
7475

7576
class CAnimatorCamEffectorScriptCB : public CAnimatorCamEffector
7677
{
77-
typedef CAnimatorCamEffector inherited;
78-
7978
shared_str cb_name;
8079

80+
protected:
81+
using inherited = CAnimatorCamEffector;
82+
8183
public:
8284
CAnimatorCamEffectorScriptCB(LPCSTR _cb) { cb_name = _cb; };
8385
virtual BOOL Valid();
@@ -88,7 +90,7 @@ class CAnimatorCamEffectorScriptCB : public CAnimatorCamEffector
8890
class CAnimatorCamLerpEffector : public CAnimatorCamEffector
8991
{
9092
protected:
91-
typedef CAnimatorCamEffector inherited;
93+
using inherited = CAnimatorCamEffector;
9294
GET_KOEFF_FUNC m_func;
9395

9496
public:
@@ -123,7 +125,8 @@ class CCameraEffectorControlled : public CAnimatorCamLerpEffector
123125

124126
class SndShockEffector : public CEffectorController
125127
{
126-
typedef CEffectorController inherited;
128+
protected:
129+
using inherited = CEffectorController;
127130

128131
public:
129132
float m_snd_length; // ms
@@ -147,8 +150,10 @@ class SndShockEffector : public CEffectorController
147150
//////////////////////////////////////////////////////////////////////////
148151
class CControllerPsyHitCamEffector : public CEffectorCam
149152
{
150-
typedef CEffectorCam inherited;
153+
protected:
154+
using inherited = CEffectorCam;
151155

156+
private:
152157
float m_time_total;
153158
float m_time_current;
154159
Fvector m_dangle_target;

src/xrGame/CustomMonster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CCustomMonster : public CEntityAlive,
3636
public Feel::Sound,
3737
public Feel::Touch
3838
{
39-
private:
39+
protected:
4040
typedef CEntityAlive inherited;
4141

4242
private:

src/xrGame/DestroyablePhysicsObject.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ class CDestroyablePhysicsObject : public CPhysicObject,
66
public CHitImmunity,
77
public CDamageManager
88
{
9-
typedef CPhysicObject inherited;
9+
protected:
10+
using inherited = CPhysicObject;
11+
12+
private:
1013
float m_fHealth;
1114
ref_sound m_destroy_sound;
1215
shared_str m_destroy_particles;

src/xrGame/PhysicObject.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ struct net_updatePhData
4848

4949
class CPhysicObject : public CPhysicsShellHolder, public CPHSkeleton
5050
{
51-
typedef CPhysicsShellHolder inherited;
51+
protected:
52+
using inherited = CPhysicsShellHolder;
53+
54+
private:
5255
EPOType m_type;
5356
float m_mass;
5457
ICollisionHitCallback* m_collision_hit_callback;

src/xrGame/agent_manager_planner.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class IGameObject;
1515

1616
class CAgentManagerPlanner : public CActionPlanner<CAgentManager>
1717
{
18-
private:
19-
typedef CActionPlanner<CAgentManager> inherited;
18+
protected:
19+
using inherited = CActionPlanner<CAgentManager>;
2020

2121
public:
2222
virtual void setup(CAgentManager* object);

src/xrGame/ai/monsters/basemonster/base_monster.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class anti_aim_ability;
5353

5454
class CBaseMonster : public CCustomMonster, public CStepManager
5555
{
56-
typedef CCustomMonster inherited;
56+
protected:
57+
using inherited = CCustomMonster;
5758

5859
public:
5960
CBaseMonster();
@@ -72,6 +73,7 @@ class CBaseMonster : public CCustomMonster, public CStepManager
7273
virtual CScriptEntity* cast_script_entity() { return this; }
7374
virtual CBaseMonster* cast_base_monster() { return this; }
7475
virtual CGameObject* cast_game_object() { return this; }
76+
7577
public:
7678
virtual BOOL renderable_ShadowReceive() { return TRUE; }
7779
virtual void Die(IGameObject* who);

src/xrGame/ai/monsters/state.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ class CState
7171
template <typename _Object>
7272
class CStateMove : public CState<_Object>
7373
{
74-
typedef CState<_Object> inherited;
74+
protected:
75+
using inherited = CState<_Object>;
7576

7677
public:
7778
CStateMove(_Object* obj, void* data = 0) : inherited(obj, data) {}

src/xrGame/ai/stalker/ai_stalker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ class CRestrictedObject;
7575

7676
class CAI_Stalker : public CCustomMonster, public CObjectHandler, public CAI_PhraseDialogManager, public CStepManager
7777
{
78-
private:
79-
typedef CCustomMonster inherited;
78+
protected:
79+
using inherited = CCustomMonster;
8080

8181
public:
8282
using inherited::useful;

src/xrGame/ai/trader/ai_trader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class CTraderAnimation;
2323

2424
class CAI_Trader : public CEntityAlive, public CInventoryOwner, public CScriptEntity, public CAI_PhraseDialogManager
2525
{
26-
typedef CEntityAlive inherited;
26+
protected:
27+
using inherited = CEntityAlive;
2728

2829
private:
2930
bool m_busy_now;

src/xrGame/entity_alive.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class CVisualMemoryManager;
1414
class CBlend;
1515
class CEntityAlive : public CEntity
1616
{
17-
typedef CEntity inherited;
17+
protected:
18+
using inherited = CEntity;
19+
20+
private:
1821
u32 m_used_time;
1922

2023
public:

0 commit comments

Comments
 (0)