Skip to content

Commit 04893d8

Browse files
committed
Fix Clang's more sensitive header order and forward declarations
1 parent 2c243df commit 04893d8

File tree

13 files changed

+38
-32
lines changed

13 files changed

+38
-32
lines changed

src/utils/xrMiscMath/vector3d_ext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "pch.hpp"
2-
#include "xrCore/_vector3d_ext.h"
32
#include "xrCommon/math_funcs_inline.h"
3+
#include "xrCore/_vector3d_ext.h"
44

55
float dotproduct(const Fvector& v1, const Fvector& v2)
66
{

src/xrAICore/AISpaceBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include "AISpaceBase.hpp"
33
#include "Navigation/game_graph.h"
44
#include "Navigation/level_graph.h"
5-
#include "Navigation/graph_engine.h"
65
#include "Navigation/PatrolPath/patrol_path_storage.h"
6+
#include "Navigation/graph_engine.h"
77

88
AISpaceBase::AISpaceBase() { GEnv.AISpace = this; }
99
AISpaceBase::~AISpaceBase()

src/xrAICore/Components/problem_solver.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "xrCore/Containers/AssociativeVector.hpp"
1212
#include "Common/object_broker.h"
1313

14-
class CGraphEngine;
15-
1614
template <typename _operator_condition, typename _condition_state, typename _operator, typename _condition_evaluator,
1715
typename _operator_id_type, bool _reverse_search = false, typename _operator_ptr = _operator*,
1816
typename _condition_evaluator_ptr = _condition_evaluator*>

src/xrAICore/Components/problem_solver_inline.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
#pragma once
1010

11+
#ifndef AI_COMPILER
12+
#include "xrAICore/Navigation/graph_engine.h"
13+
#endif
14+
1115
#define TEMPLATE_SPECIALIZATION \
1216
template <typename _operator_condition, typename _operator, typename _condition_state, \
1317
typename _condition_evaluator, typename _operator_id_type, bool _reverse_search, typename _operator_ptr, \

src/xrGame/ai/monsters/bloodsucker/bloodsucker_state_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "ai/monsters/control_movement_base.h"
88
#include "ai/monsters/control_path_builder_base.h"
99

10-
#include "ai/monsters/states/monster_state_rest.h"
1110
#include "ai/monsters/states/monster_state_attack.h"
11+
#include "ai/monsters/states/monster_state_rest.h"
1212
#include "ai/monsters/states/monster_state_panic.h"
1313
#include "ai/monsters/states/monster_state_eat.h"
1414
#include "ai/monsters/states/monster_state_hear_int_sound.h"

src/xrGame/ai/monsters/dog/dog_state_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#include "ai/monsters/control_direction_base.h"
66
#include "ai/monsters/control_movement_base.h"
77
#include "ai/monsters/control_path_builder_base.h"
8-
#include "ai/monsters/states/monster_state_hitted.h"
98
#include "ai/monsters/states/monster_state_controlled.h"
109
#include "ai/monsters/states/monster_state_help_sound.h"
1110
#include "ai/monsters/states/monster_state_hear_int_sound.h"
11+
#include "ai/monsters/states/monster_state_hitted.h"
1212
#include "ai/monsters/group_states/group_state_attack.h"
1313
#include "ai/monsters/group_states/group_state_rest.h"
1414
#include "ai/monsters/group_states/group_state_eat.h"

src/xrGame/ai/monsters/states/monster_state_rest_idle_inline.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include "state_custom_action.h"
66
#include "cover_point.h"
77
#include "ai/monsters/monster_cover_manager.h"
8+
#include "ai/monsters/ai_monster_squad.h"
9+
#include "ai/monsters/ai_monster_squad_manager.h"
810

911
#define TEMPLATE_SPECIALIZATION \
1012
template <typename _Object\

src/xrGame/aimers_base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define AIMERS_BASE_H_INCLUDED
1111

1212
#include "Include/xrRender/animation_motion.h"
13+
#include "animation_movement_controller.h"
1314
#include "Common/Noncopyable.hpp"
1415

1516
class CGameObject;

src/xrGame/debug_text_tree.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@
99
#ifndef AI_DEBUG_TEXT_TREE_H_INCLUDED
1010
#define AI_DEBUG_TEXT_TREE_H_INCLUDED
1111

12+
IC xr_string __cdecl make_xrstr(pcstr format, ...)
13+
{
14+
va_list args;
15+
va_start(args, format);
16+
17+
char temp[4096];
18+
vsprintf(temp, format, args);
19+
20+
va_end(args);
21+
return xr_string(temp);
22+
}
23+
24+
IC xr_string __cdecl make_xrstr(bool b) { return b ? "+" : "-"; }
25+
IC xr_string __cdecl make_xrstr(float f) { return make_xrstr("%f", f); }
26+
IC xr_string __cdecl make_xrstr(s32 d) { return make_xrstr("%i", d); }
27+
IC xr_string __cdecl make_xrstr(u32 d) { return make_xrstr("%u", d); }
28+
IC xr_string __cdecl make_xrstr(s64 d) { return make_xrstr("%i", d); }
29+
IC xr_string __cdecl make_xrstr(u64 d) { return make_xrstr("%u", d); }
30+
IC xr_string __cdecl make_xrstr(Fvector3 v) { return make_xrstr("[%f][%f][%f]", v.x, v.y, v.z); }
31+
IC xr_string __cdecl make_xrstr(const xr_string& s) { return s; }
32+
1233
namespace debug
1334
{
1435
class text_tree
@@ -79,25 +100,4 @@ void log_text_tree(text_tree& tree);
79100
#include "debug_text_tree_inline.h"
80101

81102
} // namespace debug
82-
83-
IC xr_string __cdecl make_xrstr(pcstr format, ...)
84-
{
85-
va_list args;
86-
va_start(args, format);
87-
88-
char temp[4096];
89-
vsprintf(temp, format, args);
90-
91-
va_end(args);
92-
return xr_string(temp);
93-
}
94-
95-
IC xr_string __cdecl make_xrstr(bool b) { return b ? "+" : "-"; }
96-
IC xr_string __cdecl make_xrstr(float f) { return make_xrstr("%f", f); }
97-
IC xr_string __cdecl make_xrstr(s32 d) { return make_xrstr("%i", d); }
98-
IC xr_string __cdecl make_xrstr(u32 d) { return make_xrstr("%u", d); }
99-
IC xr_string __cdecl make_xrstr(s64 d) { return make_xrstr("%i", d); }
100-
IC xr_string __cdecl make_xrstr(u64 d) { return make_xrstr("%u", d); }
101-
IC xr_string __cdecl make_xrstr(Fvector3 v) { return make_xrstr("[%f][%f][%f]", v.x, v.y, v.z); }
102-
IC xr_string __cdecl make_xrstr(const xr_string& s) { return s; }
103103
#endif // defined(AI_DEBUG_TEXT_TREE_H_INCLUDED)

src/xrGame/memory_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
#pragma once
1010

11+
#include "enemy_manager.h"
12+
1113
class CVisualMemoryManager;
1214
class CSoundMemoryManager;
1315
class CHitMemoryManager;
14-
class CEnemyManager;
1516
class CItemManager;
1617
class CDangerManager;
1718
class CCustomMonster;

0 commit comments

Comments
 (0)