Skip to content

Commit d0989ff

Browse files
committed
Fix issue with non-template derived member variables
It must be stated somewhere that these seemingly nondependent names are in the parent template class. See: https://isocpp.org/wiki/faq/templates#nondependent-name-lookup-types
1 parent 2e5ee9c commit d0989ff

21 files changed

+47
-1
lines changed

src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ template <typename _Object>
55
class CBloodsuckerStateAttack : public CStateMonsterAttack<_Object>
66
{
77
typedef CStateMonsterAttack<_Object> inherited_attack;
8+
using inherited = typename inherited_attack::inherited;
9+
using inherited::prev_substate;
10+
using inherited::current_substate;
11+
using inherited::m_time_start_check_behinder;
12+
using inherited::object;
813

914
u32 m_time_stop_invis;
1015
Fvector m_dir_point;
@@ -32,6 +37,7 @@ template <typename _Object>
3237
class CStateMonsterBackstubEnemy : public CState<_Object>
3338
{
3439
typedef CState<_Object> inherited;
40+
using inherited::object;
3541

3642
public:
3743
struct StateParams : SStateDataMoveToPointEx

src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ bool CBloodsuckerStateAttackAbstract::check_hiding()
183183
TEMPLATE_SPECIALIZATION
184184
void CBloodsuckerStateAttackAbstract::setup_substates()
185185
{
186-
state_ptr state = get_state_current();
186+
typename inherited::state_ptr state = get_state_current();
187187

188188
if (current_substate == eStateAttack_Hide)
189189
{

src/xrGame/ai/monsters/bloodsucker/bloodsucker_predator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ class CStateBloodsuckerPredator : public CState<_Object>
66
{
77
typedef CState<_Object> inherited;
88
typedef CState<_Object>* state_ptr;
9+
using inherited::object;
10+
using inherited::prev_substate;
11+
using inherited::time_state_started;
12+
using inherited::current_substate;
913

1014
u32 m_target_node;
1115
u32 m_time_start_camp;

src/xrGame/ai/monsters/bloodsucker/bloodsucker_state_capture_jump.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class CStateCaptureJumpBloodsucker : public CState<_Object>
88
protected:
99
typedef CState<_Object> inherited;
1010
typedef CState<_Object>* state_ptr;
11+
using inherited::prev_substate;
12+
using inherited::current_substate;
1113

1214
public:
1315
CStateCaptureJumpBloodsucker(_Object* obj);

src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ class CStateBloodsuckerVampire : public CState<_Object>
77
{
88
typedef CState<_Object> inherited;
99
typedef CState<_Object>* state_ptr;
10+
using inherited::object;
11+
using inherited::current_substate;
12+
using inherited::prev_substate;
1013

1114
const CEntityAlive* enemy;
1215

src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire_approach.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ template <typename _Object>
55
class CStateBloodsuckerVampireApproach : public CState<_Object>
66
{
77
typedef CState<_Object> inherited;
8+
using inherited::object;
89

910
public:
1011
CStateBloodsuckerVampireApproach(_Object* obj);

src/xrGame/ai/monsters/bloodsucker/bloodsucker_vampire_hide.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ class CStateBloodsuckerVampireHide : public CState<_Object>
66
{
77
typedef CState<_Object> inherited;
88
typedef CState<_Object>* state_ptr;
9+
using inherited::object;
10+
using inherited::prev_substate;
11+
using inherited::current_substate;
912

1013
public:
1114
CStateBloodsuckerVampireHide(_Object* obj);

src/xrGame/ai/monsters/chimera/chimera_state_threaten.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class CStateChimeraThreaten : public CState<_Object>
77
protected:
88
typedef CState<_Object> inherited;
99
typedef CState<_Object>* state_ptr;
10+
using inherited::object;
11+
using inherited::prev_substate;
1012

1113
enum
1214
{

src/xrGame/ai/monsters/chimera/chimera_state_threaten_roar.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ template <typename _Object>
55
class CStateChimeraThreatenRoar : public CState<_Object>
66
{
77
typedef CState<_Object> inherited;
8+
using inherited::object;
9+
using inherited::time_state_started;
810

911
public:
1012
IC CStateChimeraThreatenRoar(_Object* obj) : inherited(obj) {}

src/xrGame/ai/monsters/chimera/chimera_state_threaten_steal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ template <typename _Object>
55
class CStateChimeraThreatenSteal : public CStateMonsterMoveToPointEx<_Object>
66
{
77
typedef CStateMonsterMoveToPointEx<_Object> inherited;
8+
using inherited::object;
9+
using inherited::data;
810

911
public:
1012
IC CStateChimeraThreatenSteal(_Object* obj) : inherited(obj) {}

0 commit comments

Comments
 (0)