Skip to content

Commit 8971a83

Browse files
committed
xrGame: Other minor fixes for GCC
1 parent d5d013d commit 8971a83

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

src/xrAICore/Components/problem_solver_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ TEMPLATE_SPECIALIZATION
370370
IC typename CProblemSolverAbstract::edge_value_type CProblemSolverAbstract::estimate_edge_weight(
371371
const _index_type& condition) const
372372
{
373-
return (helper::estimate_edge_weight_impl<reverse_search>(*this, condition));
373+
return (helper::template estimate_edge_weight_impl<reverse_search>(*this, condition));
374374
}
375375

376376
TEMPLATE_SPECIALIZATION

src/xrGame/ContextMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CContextMenu::~CContextMenu()
1717
void CContextMenu::Load(CInifile* INI, LPCSTR SECT)
1818
{
1919
CInifile::Sect& S = INI->r_section(SECT);
20-
for (CInifile::SectCIt I = S.Data.begin(); S.Data.end() != I; ++I)
20+
for (auto I = S.Data.begin(); S.Data.end() != I; ++I)
2121
{
2222
char Event[128], Param[128];
2323
Event[0] = 0;

src/xrGame/agent_enemy_manager.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131

3232
const float wounded_enemy_reached_distance = 3.f;
3333

34-
const unsigned __int32 __c0 = 0x55555555;
35-
const unsigned __int32 __c1 = 0x33333333;
36-
const unsigned __int32 __c2 = 0x0f0f0f0f;
37-
const unsigned __int32 __c3 = 0x00ff00ff;
38-
const unsigned __int32 __c4 = 0x0000003f;
34+
const u32 __c0 = 0x55555555;
35+
const u32 __c1 = 0x33333333;
36+
const u32 __c2 = 0x0f0f0f0f;
37+
const u32 __c3 = 0x00ff00ff;
38+
const u32 __c4 = 0x0000003f;
3939

4040
IC u32 population(const u32& b)
4141
{
@@ -394,7 +394,7 @@ template <typename T>
394394
IC void CAgentEnemyManager::setup_mask(
395395
xr_vector<T>& objects, CMemberEnemy& enemy, const squad_mask_type& non_combat_members)
396396
{
397-
xr_vector<T>::iterator I = std::find(objects.begin(), objects.end(), enemy.m_object->ID());
397+
auto I = std::find(objects.begin(), objects.end(), enemy.m_object->ID());
398398
if (I != objects.end())
399399
{
400400
(*I).m_squad_mask.assign((*I).m_squad_mask.get() | enemy.m_distribute_mask.get());

src/xrGame/doors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace doors
1212
class door;
1313
typedef xr_vector<door*> doors_type;
1414

15-
enum door_state
15+
enum door_state : int
1616
{
1717
door_state_open,
1818
door_state_closed,

src/xrGame/doors_door.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CPhysicObject;
1414
namespace doors
1515
{
1616
class actor;
17-
enum door_state;
17+
enum door_state : int;
1818

1919
class door : private Noncopyable
2020
{

src/xrGame/queued_async_method.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct parameters_tuple3
128128
{
129129
parameters_tuple3() {}
130130
parameters_tuple3(T1 t1, T2 t2, T3 t3) : m_t1(t1), m_t2(t2), m_t3(t3){};
131-
parameters_tuple3(parameters_tuple3 const& copy) : m_t1(copy.m_t1), m_t2(copy.m_t2), m_t3(copt.m_t3){};
131+
parameters_tuple3(parameters_tuple3 const& copy) : m_t1(copy.m_t1), m_t2(copy.m_t2), m_t3(copy.m_t3){};
132132

133133
parameters_tuple3& operator=(parameters_tuple3 const& copy)
134134
{
@@ -165,7 +165,7 @@ struct parameters_tuple4
165165
return *this;
166166
}
167167

168-
bool operator==(parameters_tuple3 const& right) const
168+
bool operator==(parameters_tuple4 const& right) const
169169
{
170170
return (m_t1 == right.m_t1) && (m_t2 == right.m_t2) && (m_t3 == right.m_t3) && (m_t4 == right.m_t4);
171171
}

src/xrGame/space_restriction_manager.h

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

1111
#include "space_restriction_holder.h"
1212
#include "alife_space.h"
13+
#include "space_restriction.h"
1314

1415
namespace RestrictionSpace
1516
{
@@ -19,8 +20,6 @@ struct CTimeIntrusiveBase;
1920
template <typename _1, typename _2>
2021
class intrusive_ptr;
2122

22-
class CSpaceRestriction;
23-
2423
class CSpaceRestrictionManager : public CSpaceRestrictionHolder
2524
{
2625
friend class LevelGraphDebugRender;

0 commit comments

Comments
 (0)