Skip to content

Commit d7b940d

Browse files
author
nitrocaster
committed
Move ManagerBuilderAllocatorConstructor into DataStorageConstructor header.
1 parent d78563d commit d7b940d

File tree

2 files changed

+30
-36
lines changed

2 files changed

+30
-36
lines changed

src/xrAICore/Navigation/data_storage_constructor.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,36 @@
1111
template <typename T> class CEmptyClassTemplate {};
1212
template <typename T1, typename T2> class CEmptyClassTemplate2 {};
1313

14-
#include "xrAICore/Navigation/manager_builder_allocator_constructor.h"
14+
template <
15+
typename _manager,
16+
typename _builder, // CVertexPath
17+
typename _allocator
18+
>
19+
struct CManagerBuilderAllocatorConstructor {
20+
template <
21+
template <typename T> class _vertex = CEmptyClassTemplate,
22+
template <typename T1, typename T2> class _index_vertex = CEmptyClassTemplate2
23+
>
24+
class CDataStorage :
25+
public _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex>
26+
{
27+
public:
28+
typedef typename _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex> inherited;
29+
typedef typename inherited::CDataStorageAllocator inherited_allocator;
30+
typedef typename inherited::CGraphVertex CGraphVertex;
31+
typedef typename CGraphVertex::_index_type _index_type;
32+
33+
public:
34+
CDataStorage(const u32 vertex_count) :
35+
inherited(vertex_count)
36+
{}
37+
virtual ~CDataStorage() {}
38+
void init() { inherited::init(); }
39+
CGraphVertex &create_vertex(const _index_type &vertex_id)
40+
{ return inherited::create_vertex(inherited_allocator::create_vertex(), vertex_id); }
41+
};
42+
};
43+
1544
// instantiated in CDijkstra
1645
template <
1746
typename _algorithm, // CDataStorageBucketList|CDataStorageBinaryHeap

src/xrAICore/Navigation/manager_builder_allocator_constructor.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,3 @@
77
////////////////////////////////////////////////////////////////////////////
88

99
#pragma once
10-
11-
template <
12-
typename _manager,
13-
typename _builder, // CVertexPath
14-
typename _allocator
15-
>
16-
struct CManagerBuilderAllocatorConstructor {
17-
template <
18-
template <typename T> class _vertex = CEmptyClassTemplate,
19-
template <typename T1, typename T2> class _index_vertex = CEmptyClassTemplate2
20-
>
21-
class CDataStorage :
22-
public _manager::template CDataStorage<
23-
_builder,
24-
_allocator,
25-
_vertex,
26-
_index_vertex
27-
>
28-
{
29-
public:
30-
typedef typename _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex> inherited;
31-
typedef typename inherited::CDataStorageAllocator inherited_allocator;
32-
typedef typename inherited::CGraphVertex CGraphVertex;
33-
typedef typename CGraphVertex::_index_type _index_type;
34-
35-
public:
36-
CDataStorage(const u32 vertex_count) :
37-
inherited(vertex_count)
38-
{}
39-
virtual ~CDataStorage() {}
40-
void init() { inherited::init(); }
41-
CGraphVertex &create_vertex(const _index_type &vertex_id)
42-
{ return inherited::create_vertex(inherited_allocator::create_vertex(), vertex_id); }
43-
};
44-
};

0 commit comments

Comments
 (0)