Skip to content

Commit 5badae3

Browse files
committed
Reduce amount of warnings by moving CAI_ObjectLocation::init
1 parent 5a5e0cc commit 5badae3

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

src/xrAICore/Navigation/ai_object_location_impl.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,6 @@
1212
#include "xrAICore/Navigation/game_graph.h"
1313
#include "xrAICore/Navigation/level_graph.h"
1414

15-
IC void CAI_ObjectLocation::init()
16-
{
17-
if (ai().get_level_graph())
18-
ai().level_graph().set_invalid_vertex(m_level_vertex_id);
19-
else
20-
m_level_vertex_id = u32(-1);
21-
22-
if (ai().get_game_graph())
23-
ai().game_graph().set_invalid_vertex(m_game_vertex_id);
24-
else
25-
m_game_vertex_id = GameGraph::_GRAPH_ID(-1);
26-
}
27-
2815
IC void CAI_ObjectLocation::game_vertex(CVertex const* game_vertex)
2916
{
3017
VERIFY(ai().game_graph().valid_vertex_id(ai().game_graph().vertex_id(game_vertex)));

src/xrAICore/Navigation/ai_object_location_inline.h

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

99
#pragma once
1010

11+
#include "xrAICore/Navigation/level_graph.h"
12+
13+
IC void CAI_ObjectLocation::init()
14+
{
15+
if (ai().get_level_graph())
16+
ai().level_graph().set_invalid_vertex(m_level_vertex_id);
17+
else
18+
m_level_vertex_id = u32(-1);
19+
20+
if (ai().get_game_graph())
21+
ai().game_graph().set_invalid_vertex(m_game_vertex_id);
22+
else
23+
m_game_vertex_id = GameGraph::_GRAPH_ID(-1);
24+
}
25+
1126
IC CAI_ObjectLocation::CAI_ObjectLocation() { init(); }
1227
IC void CAI_ObjectLocation::reinit() { init(); }
1328
IC const GameGraph::_GRAPH_ID CAI_ObjectLocation::game_vertex_id() const { return (m_game_vertex_id); }

0 commit comments

Comments
 (0)