Skip to content

Commit

Permalink
xrAICore: Fix hash_fixed_vertex_manager::to_u32 in Linux
Browse files Browse the repository at this point in the history
Hopefully this time it doesn't break Windows.
  • Loading branch information
Zegeri authored and eagleivg committed Nov 8, 2018
1 parent c93673c commit 1786320
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/xrAICore/Navigation/graph_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#include "xrAICore/Navigation/vertex_manager_fixed.h"
#include "xrAICore/Navigation/vertex_allocator_fixed.h"
#include "xrAICore/Navigation/data_storage_bucket_list.h"
#include "xrAICore/Navigation/PathManagers/path_manager.h"
#include "xrAICore/Navigation/graph_engine_space.h"
#ifndef AI_COMPILER
#include "xrAICore/Navigation/vertex_manager_hash_fixed.h"
#include "xrAICore/Navigation/data_storage_binary_heap.h"
#endif
#include "xrAICore/Navigation/PathManagers/path_manager.h"
#include "xrAICore/Navigation/graph_engine_space.h"
#include "xrEngine/profiler.h"
#include "xrAICore/Components/problem_solver.h"
#include "xrAICore/Components/operator_condition.h"
Expand Down
10 changes: 6 additions & 4 deletions src/xrAICore/Navigation/vertex_manager_hash_fixed_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#pragma once

namespace hash_fixed_vertex_manager
{
extern u32 to_u32(const GraphEngineSpace::CWorldState& other);
extern u32 to_u32(const shared_str& other);
}

#define TEMPLATE_SPECIALIZATION \
template <typename TPathId, typename TIndex, u32 HashSize, u32 FixSize> \
template <typename TPathBuilder, typename TVertexAllocator, typename TCompoundVertex>
Expand Down Expand Up @@ -67,11 +73,7 @@ inline bool CHashFixedVertexManager::is_opened(const Vertex& vertex) const { ret
TEMPLATE_SPECIALIZATION
inline u32 CHashFixedVertexManager::hash_index(const Index& vertex_id) const
{
#ifdef LINUX // FIXME!!
return 0;
#else
return hash_fixed_vertex_manager::to_u32(vertex_id) % HashSize;
#endif
}

TEMPLATE_SPECIALIZATION
Expand Down

0 comments on commit 1786320

Please sign in to comment.