From 37b7b48dae0c60f35986690b067704d09ecea9f3 Mon Sep 17 00:00:00 2001 From: Ilya Orlov Date: Fri, 24 Aug 2018 18:34:09 +0300 Subject: [PATCH] xrGame: fix some templates for linux build --- src/xrAICore/Components/problem_solver.h | 2 +- src/xrGame/action_planner.h | 4 ++-- src/xrGame/action_planner_action.h | 2 +- src/xrGame/ai/stalker/ai_stalker.h | 12 ++++++------ src/xrGame/alife_abstract_registry.h | 2 +- src/xrGame/game_cl_mp.h | 6 +++--- src/xrGame/ini_id_loader.h | 2 +- src/xrGame/restricted_object.h | 2 +- src/xrGame/script_game_object.h | 8 ++++---- src/xrGame/stalker_movement_params.h | 8 ++++---- src/xrServerEntities/restriction_space.h | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/xrAICore/Components/problem_solver.h b/src/xrAICore/Components/problem_solver.h index 7fccbb4d6b6..e34ac21449e 100644 --- a/src/xrAICore/Components/problem_solver.h +++ b/src/xrAICore/Components/problem_solver.h @@ -33,8 +33,8 @@ class CProblemSolver typedef _operator COperator; typedef _condition_state CState; typedef _condition_evaluator CConditionEvaluator; + typedef _operator_ptr operator_ptr; #ifdef WINDOWS - typedef _operator_ptr _operator_ptr; typedef _condition_evaluator_ptr _condition_evaluator_ptr; #endif typedef typename _operator_condition::condition_type condition_type; diff --git a/src/xrGame/action_planner.h b/src/xrGame/action_planner.h index 1452eebd5b8..0bfda5af9a2 100644 --- a/src/xrGame/action_planner.h +++ b/src/xrGame/action_planner.h @@ -34,12 +34,12 @@ class CActionPlanner using _condition_type = typename CProblemSolver::condition_type; using _edge_type = typename CProblemSolver::edge_type; using _value_type = typename CProblemSolver::value_type; - using _operator_ptr = typename CProblemSolver::_operator_ptr; + using _operator_ptr = typename CProblemSolver::operator_ptr; typedef CProblemSolver inherited; typedef typename inherited::edge_type _action_id_type; typedef GraphEngineSpace::CWorldProperty CWorldProperty; typedef GraphEngineSpace::CWorldState CWorldState; - typedef _world_operator _world_operator; + typedef _world_operator world_operator; protected: bool m_initialized; diff --git a/src/xrGame/action_planner_action.h b/src/xrGame/action_planner_action.h index ba2ecbe6a39..98a38b09b87 100644 --- a/src/xrGame/action_planner_action.h +++ b/src/xrGame/action_planner_action.h @@ -25,7 +25,7 @@ class CActionPlannerAction : public CActionPlanner<_object_type>, public CAction public: using COperatorCondition = typename inherited_action::COperatorCondition; - using _world_operator = typename inherited_planner::_world_operator; + using _world_operator = typename inherited_planner::world_operator; #ifdef LOG_ACTION public: diff --git a/src/xrGame/ai/stalker/ai_stalker.h b/src/xrGame/ai/stalker/ai_stalker.h index 855837ebaf0..b5498834400 100644 --- a/src/xrGame/ai/stalker/ai_stalker.h +++ b/src/xrGame/ai/stalker/ai_stalker.h @@ -31,12 +31,12 @@ typedef CActionPlanner, namespace MonsterSpace { enum EMovementDirection; -}; +} namespace StalkerSpace { enum EBodyAction; -}; +} namespace smart_cover { @@ -46,8 +46,8 @@ class loophole; namespace transitions { class action; -}; -}; +} +} enum ECriticalWoundType; @@ -321,8 +321,8 @@ class CAI_Stalker : public CCustomMonster, public CObjectHandler, public CAI_Phr bool m_can_select_weapon; public: - bool can_select_weapon() { return m_can_select_weapon; }; - void can_select_weapon(bool can) { m_can_select_weapon = can; }; + bool can_select_weapon() { return m_can_select_weapon; } + void can_select_weapon(bool can) { m_can_select_weapon = can; } bool can_take(CInventoryItem const* item); protected: diff --git a/src/xrGame/alife_abstract_registry.h b/src/xrGame/alife_abstract_registry.h index 760d90f8285..4b985fbfe67 100644 --- a/src/xrGame/alife_abstract_registry.h +++ b/src/xrGame/alife_abstract_registry.h @@ -23,7 +23,7 @@ class CALifeAbstractRegistry : public ISerializable OBJECT_REGISTRY m_objects; public: - typedef typename _data_type _data; + typedef _data_type _data; IC CALifeAbstractRegistry(); virtual ~CALifeAbstractRegistry(); diff --git a/src/xrGame/game_cl_mp.h b/src/xrGame/game_cl_mp.h index 6dae99f44d8..188bcfd58f7 100644 --- a/src/xrGame/game_cl_mp.h +++ b/src/xrGame/game_cl_mp.h @@ -294,7 +294,7 @@ class game_cl_mp : public game_cl_GameState u32 m_max_size; game_cl_mp* m_owner; CMemoryWriter m_writer; - fr_callback_binder() : m_frnode(NULL), m_active(false){}; + fr_callback_binder() : m_frnode(NULL), m_active(false){} void __stdcall receiving_file_callback( file_transfer::receiving_status_t status, u32 bytes_received, u32 data_size); void __stdcall receiving_serverinfo_callback( @@ -316,8 +316,8 @@ class game_cl_mp : public game_cl_GameState bool m_ready_to_open_buy_menu; public: - bool is_buy_menu_ready() const { return m_ready_to_open_buy_menu; }; - void set_buy_menu_not_ready() { m_ready_to_open_buy_menu = false; }; + bool is_buy_menu_ready() const { return m_ready_to_open_buy_menu; } + void set_buy_menu_not_ready() { m_ready_to_open_buy_menu = false; } void decompress_and_save_screenshot(LPCSTR file_name, u8* data, u32 data_size, u32 file_size); void decompress_and_process_config(LPCSTR file_name, u8* data, u32 data_size, u32 file_size); diff --git a/src/xrGame/ini_id_loader.h b/src/xrGame/ini_id_loader.h index 30000bfe3b9..da336c35f8c 100644 --- a/src/xrGame/ini_id_loader.h +++ b/src/xrGame/ini_id_loader.h @@ -112,7 +112,7 @@ CSINI_IdToIndex::~CIni_IdToIndex() {} TEMPLATE_SPECIALIZATION const ITEM_DATA* CSINI_IdToIndex::GetById(const T_ID& str_id, bool no_assert) { - T_VECTOR::iterator it; + typename T_VECTOR::iterator it; for (it = m_pItemDataVector->begin(); m_pItemDataVector->end() != it; it++) { if (!xr_strcmp((*it).id, str_id)) diff --git a/src/xrGame/restricted_object.h b/src/xrGame/restricted_object.h index 3509b23a5df..33edf62ae75 100644 --- a/src/xrGame/restricted_object.h +++ b/src/xrGame/restricted_object.h @@ -17,7 +17,7 @@ class CGameObject; namespace RestrictionSpace { enum ERestrictorTypes; -}; +} template struct CRestrictionPredicate; diff --git a/src/xrGame/script_game_object.h b/src/xrGame/script_game_object.h index e3e1ab3d962..e81f2055461 100644 --- a/src/xrGame/script_game_object.h +++ b/src/xrGame/script_game_object.h @@ -63,7 +63,7 @@ struct CVisibleObject; struct CSoundObject; struct CHitObject; struct CNotYetVisibleObject; -}; +} namespace MonsterSpace { @@ -82,12 +82,12 @@ enum EScriptSoundAnim; enum EMonsterSounds; enum EMonsterHeadAnimType; struct SBoneRotation; -}; +} namespace GameObject { enum ECallbackType; -}; +} class CGameObject; class CScriptHit; @@ -320,7 +320,7 @@ class CScriptGameObject void GiveGameNews(LPCSTR caption, LPCSTR news, LPCSTR texture_name, int delay, int show_time); void GiveGameNews(LPCSTR caption, LPCSTR news, LPCSTR texture_name, int delay, int show_time, int type); - void AddIconedTalkMessage_old(LPCSTR text, LPCSTR texture_name, LPCSTR templ_name){}; + void AddIconedTalkMessage_old(LPCSTR text, LPCSTR texture_name, LPCSTR templ_name){} void AddIconedTalkMessage(LPCSTR caption, LPCSTR text, LPCSTR texture_name, LPCSTR templ_name); //предикаты наличия/отсутствия порции информации у персонажа bool HasInfo(LPCSTR info_id); diff --git a/src/xrGame/stalker_movement_params.h b/src/xrGame/stalker_movement_params.h index 24594439f78..23ac63fb3d8 100644 --- a/src/xrGame/stalker_movement_params.h +++ b/src/xrGame/stalker_movement_params.h @@ -16,23 +16,23 @@ enum EBodyState; enum EMovementType; enum EMentalState; enum EPathType; -}; +} namespace MovementManager { enum EPathType; -}; +} namespace DetailPathManager { enum EDetailPathType; -}; +} namespace smart_cover { class cover; class loophole; -}; +} class CGameObject; class stalker_movement_manager_smart_cover; diff --git a/src/xrServerEntities/restriction_space.h b/src/xrServerEntities/restriction_space.h index 8183a338070..4eca28f6e6a 100644 --- a/src/xrServerEntities/restriction_space.h +++ b/src/xrServerEntities/restriction_space.h @@ -35,4 +35,4 @@ enum ERestrictorTypes eRestrictorTypeIn = u8(4), eRestrictorTypeOut = u8(5), }; -}; // namespace RestrictionSpace +} // namespace RestrictionSpace