Skip to content

Commit

Permalink
Remove redundant _vertex_index template parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Dec 10, 2015
1 parent d7b940d commit 1bd9621
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
7 changes: 3 additions & 4 deletions src/xrAICore/Navigation/data_storage_constructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ template <
>
struct CManagerBuilderAllocatorConstructor {
template <
template <typename T> class _vertex = CEmptyClassTemplate,
template <typename T1, typename T2> class _index_vertex = CEmptyClassTemplate2
template <typename T> class _vertex = CEmptyClassTemplate
>
class CDataStorage :
public _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex>
public _manager::template CDataStorage<_builder, _allocator, _vertex>
{
public:
typedef typename _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex> inherited;
typedef typename _manager::template CDataStorage<_builder, _allocator, _vertex> inherited;
typedef typename inherited::CDataStorageAllocator inherited_allocator;
typedef typename inherited::CGraphVertex CGraphVertex;
typedef typename CGraphVertex::_index_type _index_type;
Expand Down
7 changes: 3 additions & 4 deletions src/xrAICore/Navigation/vertex_manager_fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ struct CVertexManagerFixed {
template <
typename _builder,
typename _allocator,
template <typename _T> class _vertex = CEmptyClassTemplate,
template <typename _T1, typename _T2> class _index_vertex = CEmptyClassTemplate2
template <typename _T> class _vertex = CEmptyClassTemplate
>
class CDataStorage :
public _builder::template CDataStorage<VertexManager<_vertex>::_vertex>,
Expand All @@ -51,11 +50,11 @@ struct CVertexManagerFixed {
typename _builder::template CDataStorage<VertexManager<_vertex>::_vertex>::CGraphVertex> CDataStorageAllocator;
typedef typename CDataStorageBase::CGraphVertex CGraphVertex;
typedef typename CGraphVertex::_index_type _index_type;
//using inherited = CDataStorageAllocator;

#pragma pack(push,1)
template <typename _path_id_type>
struct SGraphIndexVertex : public _index_vertex<CGraphVertex,SGraphIndexVertex<_path_id_type> > {
struct SGraphIndexVertex
{
_path_id_type m_path_id;
CGraphVertex *m_vertex;
};
Expand Down
5 changes: 2 additions & 3 deletions src/xrAICore/Navigation/vertex_manager_fixed_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
template <\
typename _builder,\
typename _allocator,\
template <typename _T> class _vertex,\
template <typename _T1, typename _T2> class _index_vertex\
template <typename _T> class _vertex\
>

#define CFixedVertexManager CVertexManagerFixed<_path_id_type,_index_type,mask>::CDataStorage<_builder,_allocator,_vertex,_index_vertex>
#define CFixedVertexManager CVertexManagerFixed<_path_id_type,_index_type,mask>::CDataStorage<_builder,_allocator,_vertex>

TEMPLATE_SPECIALIZATION
IC CFixedVertexManager::CDataStorage (const u32 vertex_count) :
Expand Down
6 changes: 3 additions & 3 deletions src/xrAICore/Navigation/vertex_manager_hash_fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ struct CVertexManagerHashFixed {
template <
typename _builder,
typename _allocator,
template <typename _T> class _vertex = CEmptyClassTemplate,
template <typename _T1, typename _T2> class _index_vertex = CEmptyClassTemplate2
template <typename _T> class _vertex = CEmptyClassTemplate
>
class CDataStorage :
public _builder::template CDataStorage<VertexManager<_vertex>::_vertex>,
Expand All @@ -65,7 +64,8 @@ struct CVertexManagerHashFixed {

#pragma pack(push,1)
template <typename _path_id_type>
struct SGraphIndexVertex : public _index_vertex<CGraphVertex,SGraphIndexVertex<_path_id_type> > {
struct SGraphIndexVertex
{
CGraphVertex *m_vertex;
SGraphIndexVertex *m_next;
SGraphIndexVertex *m_prev;
Expand Down
5 changes: 2 additions & 3 deletions src/xrAICore/Navigation/vertex_manager_hash_fixed_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
template <\
typename _builder,\
typename _allocator,\
template <typename _T> class _vertex,\
template <typename _T1, typename _T2> class _index_vertex\
template <typename _T> class _vertex\
>

#define CHashFixedVertexManager CVertexManagerHashFixed<_path_id_type,_index_type,hash_size,fix_size>::CDataStorage<_builder,_allocator,_vertex,_index_vertex>
#define CHashFixedVertexManager CVertexManagerHashFixed<_path_id_type,_index_type,hash_size,fix_size>::CDataStorage<_builder,_allocator,_vertex>

TEMPLATE_SPECIALIZATION
IC CHashFixedVertexManager::CDataStorage (const u32 vertex_count) :
Expand Down

0 comments on commit 1bd9621

Please sign in to comment.