Skip to content

Commit 71c3a08

Browse files
committed
xrGame: fix some warnings for cotire build
1 parent d5da513 commit 71c3a08

27 files changed

+48
-46
lines changed

src/xrAICore/Navigation/ai_object_location.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace LevelGraph
1414
{
1515
class CVertex;
16-
};
16+
}
1717

1818
class CAI_ObjectLocation
1919
{

src/xrEngine/Rain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "stdafx.h"
2-
#pragma once
32

43
#include "Rain.h"
54
#include "IGame_Persistent.h"

src/xrGame/CharacterPhysicsSupport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,10 +1362,10 @@ void CCharacterPhysicsSupport::on_destroy_anim_mov_ctrl()
13621362
anim_mov_state.active = false;
13631363
}
13641364

1365-
bool CCharacterPhysicsSupport::interactive_motion() { return is_imotion(m_interactive_motion); }
1365+
bool CCharacterPhysicsSupport::is_interactive_motion() { return is_imotion(m_interactive_motion); }
13661366
bool CCharacterPhysicsSupport::can_drop_active_weapon()
13671367
{
1368-
return !interactive_motion() && m_flags.test(fl_death_anim_on);
1368+
return !is_interactive_motion() && m_flags.test(fl_death_anim_on);
13691369
};
13701370

13711371
void CCharacterPhysicsSupport::in_Die()

src/xrGame/CharacterPhysicsSupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class CCharacterPhysicsSupport : public CPHSkeleton, public CPHDestroyable
104104
IC const CPHMovementControl* movement() const { return m_PhysicMovementControl; }
105105
IC CPHSoundPlayer* ph_sound_player() { return &m_ph_sound_player; }
106106
IC CIKLimbsController* ik_controller() { return m_ik_controller; }
107-
bool interactive_motion();
107+
bool is_interactive_motion();
108108
bool can_drop_active_weapon();
109109
void SetRemoved();
110110
bool IsRemoved() { return m_eState == esRemoved; }

src/xrGame/ai/stalker/ai_stalker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ void CAI_Stalker::aim_target(Fvector& result, const CGameObject* object)
13751375
BOOL CAI_Stalker::AlwaysTheCrow()
13761376
{
13771377
VERIFY(character_physics_support());
1378-
return (character_physics_support()->interactive_motion());
1378+
return (character_physics_support()->is_interactive_motion());
13791379
}
13801380

13811381
smart_cover::cover const* CAI_Stalker::get_current_smart_cover()

src/xrGame/ai_space.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CAI_Space : public AISpaceBase
5959
IC const CALifeSimulator& alife() const;
6060
IC const CALifeSimulator* get_alife() const;
6161
IC const CCoverManager& cover_manager() const;
62-
IC moving_objects& moving_objects() const;
62+
IC moving_objects& get_moving_objects() const;
6363
IC doors::manager& doors() const;
6464
};
6565

src/xrGame/ai_space_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IC const CCoverManager& CAI_Space::cover_manager() const
2727
return (*m_cover_manager);
2828
}
2929

30-
IC moving_objects& CAI_Space::moving_objects() const
30+
IC moving_objects& CAI_Space::get_moving_objects() const
3131
{
3232
VERIFY(m_moving_objects);
3333
return (*m_moving_objects);

src/xrGame/cover_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ class id_predicate_less
201201
{
202202
VERIFY(lhs);
203203
VERIFY(rhs);
204-
return (lhs->object().cName()._get() < rhs->object().cName()._get());
204+
return (lhs->get_object().cName()._get() < rhs->get_object().cName()._get());
205205
}
206206
IC bool operator()(Cover* cover, shared_str const& id)
207207
{
208208
VERIFY(cover);
209-
return (cover->object().cName()._get() < id._get());
209+
return (cover->get_object().cName()._get() < id._get());
210210
}
211211
};
212212

src/xrGame/dynamic_obstacles_avoider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
void dynamic_obstacles_avoider::query()
1818
{
19-
ai().moving_objects().query_action_dynamic(object().get_moving_object());
19+
ai().get_moving_objects().query_action_dynamic(object().get_moving_object());
2020

2121
m_current_iteration.swap(object().get_moving_object()->dynamic_query());
2222
}

src/xrGame/game_location_selector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CBaseLocationSelector<CGameGraph, _VertexEvaluator, _vertex_id_type>
4141
IC void init();
4242
IC virtual void reinit(const _Graph* graph = 0);
4343
IC void set_selection_type(const ESelectionType selection_type);
44-
IC void selection_type() const;
44+
IC ESelectionType selection_type() const;
4545
IC bool actual(const _vertex_id_type start_vertex_id, bool path_completed);
4646
IC void select_location(const _vertex_id_type start_vertex_id, _vertex_id_type& dest_vertex_id);
4747
};

src/xrGame/game_location_selector_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ IC void CGameLocationSelector::select_random_location(
157157
}
158158

159159
TEMPLATE_SPECIALIZATION
160-
IC void CGameLocationSelector::selection_type() const { return (m_selection_type); }
160+
IC ESelectionType CGameLocationSelector::selection_type() const { return (m_selection_type); }
161161
TEMPLATE_SPECIALIZATION
162162
IC bool CGameLocationSelector::actual(const _vertex_id_type start_vertex_id, bool path_completed)
163163
{

src/xrGame/moving_object.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ moving_object::moving_object(const CEntityAlive* object)
2323

2424
update_position();
2525

26-
ai().moving_objects().register_object(this);
26+
ai().get_moving_objects().register_object(this);
2727
}
2828

29-
moving_object::~moving_object() { ai().moving_objects().unregister_object(this); }
30-
void moving_object::on_object_move() { ai().moving_objects().on_object_move(this); }
29+
moving_object::~moving_object() { ai().get_moving_objects().unregister_object(this); }
30+
void moving_object::on_object_move() { ai().get_moving_objects().on_object_move(this); }
3131
void moving_object::update_position() { m_position = m_object->Position(); }
3232
Fvector moving_object::predict_position(const float& time_to_check) const
3333
{

src/xrGame/script_game_object.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ pcstr CScriptGameObject::get_smart_cover_description() const
673673
LuaMessageType::Error, "smart_cover::object : cannot access class member get_smart_cover_description!");
674674
return nullptr;
675675
}
676-
return smart_cover_object->cover().description()->table_id().c_str();
676+
return smart_cover_object->get_cover().get_description()->table_id().c_str();
677677
}
678678

679679
void CScriptGameObject::set_visual_name(LPCSTR visual) { object().cNameVisual_set(visual); }

src/xrGame/script_game_object_inventory_owner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ bool CScriptGameObject::suitable_smart_cover(CScriptGameObject* object)
15791579
return (false);
15801580
}
15811581

1582-
smart_cover::cover const& cover = smart_object->cover();
1582+
smart_cover::cover const& cover = smart_object->get_cover();
15831583
if (!cover.can_fire())
15841584
return (true);
15851585

src/xrGame/smart_cover.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class cover final : public CCoverPoint, private Noncopyable
5656
luabind::adl::object const& loopholes);
5757
~cover();
5858
IC Loopholes const& loopholes() const;
59-
IC object const& object() const;
59+
IC object const& get_object() const;
6060
IC Fvector fov_position(loophole const& loophole) const;
6161
IC Fvector fov_direction(loophole const& loophole) const;
6262
IC Fvector danger_fov_direction(loophole const& loophole) const;
@@ -66,7 +66,7 @@ class cover final : public CCoverPoint, private Noncopyable
6666
u32 const& action_level_vertex_id(loophole const& loophole, shared_str const& action_id) const;
6767
loophole* best_loophole(
6868
Fvector const& position, float& value, bool const& use_default_behaviour, bool is_smart_cover_entered) const;
69-
IC DescriptionPtr const& description() const;
69+
IC DescriptionPtr const& get_description() const;
7070
void evaluate_loophole(
7171
Fvector const& position, loophole*& source, loophole*& result, float& value, bool is_smart_cover_entered) const;
7272
IC shared_str const& id() const;

src/xrGame/smart_cover_description.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ description::~description()
224224
delete_data(m_transitions);
225225
}
226226

227-
loophole const* description::loophole(shared_str const& loophole_id) const
227+
loophole const* description::get_loophole(shared_str const& loophole_id) const
228228
{
229229
class id_predicate
230230
{

src/xrGame/smart_cover_description.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class description final : private Noncopyable, public detail::intrusive_base_tim
4242
IC shared_str const& table_id() const;
4343
IC Loopholes const& loopholes() const;
4444
IC TransitionGraph const& transitions() const;
45-
loophole const* loophole(shared_str const& loophole_id) const;
45+
loophole const* get_loophole(shared_str const& loophole_id) const;
4646

4747
private:
4848
void load_loopholes(shared_str const& table_id);

src/xrGame/smart_cover_inline.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#define cover smart_cover::cover
1212

13-
IC smart_cover::object const& cover::object() const { return (m_object); }
13+
IC smart_cover::object const& cover::get_object() const { return (m_object); }
1414
IC cover::Loopholes const& cover::loopholes() const { return (m_loopholes); }
1515
IC Fvector cover::fov_position(loophole const& loophole) const
1616
{
@@ -50,7 +50,7 @@ IC Fvector cover::position(Fvector const& position) const
5050
return (pos);
5151
}
5252

53-
IC cover::DescriptionPtr const& cover::description() const { return (m_description); }
53+
IC cover::DescriptionPtr const& cover::get_description() const { return (m_description); }
5454
IC shared_str const& cover::id() const { return (m_id); }
5555
IC bool cover::is_combat_cover() const { return (m_is_combat_cover); }
5656
IC bool cover::can_fire() const { return (m_is_combat_cover || m_can_fire); }

src/xrGame/smart_cover_object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class object : public CGameObject
4949

5050
IC float const& enter_min_enemy_distance() const;
5151
IC float const& exit_min_enemy_distance() const;
52-
IC cover const& cover() const;
52+
IC cover const& get_cover() const;
5353
};
5454

5555
} // namespace smart_cover

src/xrGame/smart_cover_object_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
IC float const& smart_cover::object::enter_min_enemy_distance() const { return (m_enter_min_enemy_distance); }
1313
IC float const& smart_cover::object::exit_min_enemy_distance() const { return (m_exit_min_enemy_distance); }
14-
IC smart_cover::cover const& smart_cover::object::cover() const
14+
IC smart_cover::cover const& smart_cover::object::get_cover() const
1515
{
1616
VERIFY(m_cover);
1717
return (*m_cover);

src/xrGame/stalker_movement_manager_smart_cover.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void stalker_movement_manager_smart_cover::reach_enter_location(u32 const& time_
189189
target_loophole.enterable() ? target_loophole : nearest_enterable_loophole();
190190

191191
Fvector position;
192-
m_target.cover()->object().XFORM().transform_tiny(position, current_transition().animation().position());
192+
m_target.cover()->get_object().XFORM().transform_tiny(position, current_transition().animation().position());
193193

194194
u32 level_vertex_id = ai().level_graph().vertex(u32(-1), position);
195195
if (!accessible(level_vertex_id) || !accessible(position))
@@ -369,9 +369,9 @@ void stalker_movement_manager_smart_cover::loophole_path(smart_cover::cover cons
369369
typedef GraphEngineSpace::CBaseParameters CBaseParameters;
370370
CBaseParameters parameters(u32(-1), u32(-1), u32(-1));
371371
path.clear();
372-
R_ASSERT2(ai().graph_engine().search(cover.description()->transitions(), source, target, &path, parameters),
372+
R_ASSERT2(ai().graph_engine().search(cover.get_description()->transitions(), source, target, &path, parameters),
373373
make_string("cannot build path via loopholes [%s] -> [%s] (cover %s)", source_raw.c_str(), target_raw.c_str(),
374-
cover.description()->table_id().c_str()));
374+
cover.get_description()->table_id().c_str()));
375375
}
376376

377377
bool stalker_movement_manager_smart_cover::exit_transition()

src/xrGame/stalker_movement_manager_smart_cover_fov_range.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bool stalker_movement_manager_smart_cover::in_current_loophole_fov(Fvector const
7272
smart_cover::cover const* cover = ai().cover_manager().smart_cover(m_enter_cover_id);
7373
VERIFY(cover);
7474

75-
smart_cover::loophole const* loophole = cover->description()->loophole(m_enter_loophole_id);
75+
smart_cover::loophole const* loophole = cover->get_description()->get_loophole(m_enter_loophole_id);
7676
return (cover->is_position_in_fov(*loophole, position));
7777
}
7878

@@ -86,7 +86,7 @@ bool stalker_movement_manager_smart_cover::in_current_loophole_range(Fvector con
8686
smart_cover::cover const* cover = ai().cover_manager().smart_cover(m_enter_cover_id);
8787
VERIFY(cover);
8888

89-
smart_cover::loophole const* loophole = cover->description()->loophole(m_enter_loophole_id);
89+
smart_cover::loophole const* loophole = cover->get_description()->get_loophole(m_enter_loophole_id);
9090
return (cover->is_position_in_range(*loophole, position));
9191
}
9292

src/xrGame/stalker_movement_manager_smart_cover_loopholes.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ using MemorySpace::CMemoryInfo;
3636
float stalker_movement_manager_smart_cover::enter_path(LoopholePath* result, Fvector const& position,
3737
u32 const level_vertex_id, smart_cover::cover const& cover, shared_str const& target_loophole_id)
3838
{
39-
VERIFY(cover.description()->loophole(target_loophole_id));
39+
VERIFY(cover.get_description()->loophole(target_loophole_id));
4040

4141
float value = flt_max;
4242

4343
typedef smart_cover::cover::Loopholes Loopholes;
4444

45-
Loopholes const& loopholes = cover.description()->loopholes();
45+
Loopholes const& loopholes = cover.get_description()->loopholes();
4646
Loopholes::const_iterator i = loopholes.begin();
4747
Loopholes::const_iterator e = loopholes.end();
4848
for (; i != e; ++i)
@@ -153,15 +153,15 @@ stalker_movement_manager_smart_cover::transition_action const& stalker_movement_
153153
typedef smart_cover::description::ActionsList ActionsList;
154154
typedef smart_cover::transitions::action action;
155155

156-
edge_type const* edge = cover.description()->transitions().edge(loophole_id0, loophole_id1);
156+
edge_type const* edge = cover.get_description()->transitions().edge(loophole_id0, loophole_id1);
157157
VERIFY(edge);
158158
ActionsList const& actions = edge->data();
159159

160160
transition_action const* result = 0;
161161
float min_distance_sqr = flt_max;
162162

163163
EBodyState result_body_state = eBodyStateDummy;
164-
Fmatrix const& transform = cover.object().XFORM();
164+
Fmatrix const& transform = cover.get_object().XFORM();
165165
ActionsList::const_iterator i = actions.begin();
166166
ActionsList::const_iterator e = actions.end();
167167
for (; i != e; ++i)
@@ -227,7 +227,7 @@ stalker_movement_manager_smart_cover::transition_action const& stalker_movement_
227227
typedef smart_cover::description::ActionsList ActionsList;
228228
typedef smart_cover::transitions::action action;
229229

230-
edge_type const* edge = cover.description()->transitions().edge(loophole_id0, loophole_id1);
230+
edge_type const* edge = cover.get_description()->transitions().edge(loophole_id0, loophole_id1);
231231
VERIFY(edge);
232232
ActionsList const& actions = edge->data();
233233

@@ -254,7 +254,7 @@ void stalker_movement_manager_smart_cover::build_exit_path()
254254
smart_cover::loophole const& cur_loophole = *m_current.cover_loophole();
255255

256256
typedef smart_cover::cover::Loopholes Loopholes;
257-
Loopholes const& loopholes = cur_cover.description()->loopholes();
257+
Loopholes const& loopholes = cur_cover.get_description()->loopholes();
258258
Loopholes::const_iterator I = loopholes.begin();
259259
Loopholes::const_iterator E = loopholes.end();
260260
for (; I != E; ++I)
@@ -267,7 +267,7 @@ void stalker_movement_manager_smart_cover::build_exit_path()
267267
VERIFY(!m_temp_loophole_path.empty());
268268

269269
float new_value = ai().graph_engine().m_string_algorithm->data_storage().get_best().g();
270-
float exit_edge = cur_cover.description()
270+
float exit_edge = cur_cover.get_description()
271271
->transitions()
272272
.edge(exitable_loophole_id, smart_cover::transform_vertex("", false))
273273
->weight();
@@ -328,10 +328,10 @@ void stalker_movement_manager_smart_cover::build_exit_path_to_cover()
328328
smart_cover::loophole const& target_loophole = *m_target.cover_loophole();
329329

330330
Fvector target_position;
331-
target_cover.object().XFORM().transform_tiny(target_position, target_loophole.fov_position());
331+
target_cover.get_object().XFORM().transform_tiny(target_position, target_loophole.fov_position());
332332

333333
typedef smart_cover::cover::Loopholes Loopholes;
334-
Loopholes const& loopholes = current_cover.description()->loopholes();
334+
Loopholes const& loopholes = current_cover.get_description()->loopholes();
335335
Loopholes::const_iterator I = loopholes.begin();
336336
Loopholes::const_iterator E = loopholes.end();
337337
for (; I != E; ++I)
@@ -344,7 +344,7 @@ void stalker_movement_manager_smart_cover::build_exit_path_to_cover()
344344
VERIFY(!m_temp_loophole_path.empty());
345345

346346
float new_value = ai().graph_engine().m_string_algorithm->data_storage().get_best().g();
347-
float exit_edge = current_cover.description()
347+
float exit_edge = current_cover.get_description()
348348
->transitions()
349349
.edge(exitable_loophole_id, smart_cover::transform_vertex("", false))
350350
->weight();
@@ -624,7 +624,7 @@ loophole const& stalker_movement_manager_smart_cover::loophole(
624624
smart_cover::cover const& cover, shared_str const& loophole_id) const
625625
{
626626
typedef smart_cover::cover::Loopholes Loopholes;
627-
Loopholes const& loopholes = cover.description()->loopholes();
627+
Loopholes const& loopholes = cover.get_description()->loopholes();
628628
Loopholes::const_iterator i = std::find_if(loopholes.begin(), loopholes.end(), loophole_id_predicate(loophole_id));
629629

630630
VERIFY2(i != loopholes.end(),

src/xrGame/stalker_movement_params.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void stalker_movement_params::cover_loophole_id(shared_str const& loophole_id)
161161
VERIFY(m_cover);
162162

163163
typedef smart_cover::cover::Loopholes Loopholes;
164-
Loopholes const& loopholes = m_cover->description()->loopholes();
164+
Loopholes const& loopholes = m_cover->get_description()->loopholes();
165165
Loopholes::const_iterator i = std::find_if(loopholes.begin(), loopholes.end(), loophole_id_predicate(loophole_id));
166166

167167
VERIFY2(i != loopholes.end(),
@@ -174,7 +174,7 @@ void stalker_movement_params::actualize_loophole() const
174174
{
175175
if (m_selected_loophole_actual)
176176
{
177-
if (!m_cover || !m_cover_selected_loophole || m_cover->description()->loophole(m_cover_selected_loophole->id()))
177+
if (!m_cover || !m_cover_selected_loophole || m_cover->get_description()->get_loophole(m_cover_selected_loophole->id()))
178178
{
179179
if (m_last_selection_time + time_before_selection > Device.dwTimeGlobal)
180180
return;

src/xrGame/static_obstacles_avoider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
const CAI_Stalker& static_obstacles_avoider::object() const { return (movement_manager().object()); }
1818
void static_obstacles_avoider::query(const Fvector& start_position, const Fvector& dest_position)
1919
{
20-
ai().moving_objects().query_action_static(object().get_moving_object(), start_position, dest_position);
20+
ai().get_moving_objects().query_action_static(object().get_moving_object(), start_position, dest_position);
2121

2222
m_current_iteration.swap(object().get_moving_object()->static_query());
2323
}
2424

2525
void static_obstacles_avoider::query()
2626
{
27-
ai().moving_objects().query_action_static(object().get_moving_object());
27+
ai().get_moving_objects().query_action_static(object().get_moving_object());
2828

2929
m_current_iteration.swap(object().get_moving_object()->static_query());
3030
}

src/xrGame/visual_memory_manager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
#include "visual_memory_params.h"
1212
#include "memory_space.h"
13+
#include "memory_space_impl.h"
1314
#include "xrCommon/xr_vector.h"
1415

16+
1517
class CCustomMonster;
1618
class CAI_Stalker;
1719
class vision_client;

src/xrServerEntities/PropertiesListTypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "xrCore/_rect.h"
99
#include "xrCore/xr_trims.h"
1010
#include "xrCore/xr_shortcut.h"
11+
#include "xrCore/xr_token.h"
1112
//#include "xrCore/xrCore.h"
1213

1314
#ifdef __BORLANDC__

0 commit comments

Comments
 (0)