summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/path-search-dijkstra.cpp6
-rw-r--r--src/path-search.hpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/path-search-dijkstra.cpp b/src/path-search-dijkstra.cpp
index 444d5ee7..e0f09a65 100644
--- a/src/path-search-dijkstra.cpp
+++ b/src/path-search-dijkstra.cpp
@@ -127,7 +127,7 @@ uint32_t astar::pop_from_heap()
return id;
}
-#ifndef FM_ASTAR_NO_EDGE_CACHE
+#if !FM_ASTAR_NO_EDGE_CACHE
auto astar::make_edge(const point& a, const point& b) -> edge
{
if (a < b)
@@ -277,7 +277,7 @@ path_search_result astar::Dijkstra(world& w, point from_, point to_, object_id o
continue;
}
-#ifdef FM_ASTAR_NO_EDGE_CACHE
+#if FM_ASTAR_NO_EDGE_CACHE
{ auto vec_ = Vector2(vec);
auto bb1 = bbox<float>{ bb0.min + vec_, bb0.max + vec_ };
auto bb = bbox_union(bb1, bb0);
@@ -331,7 +331,7 @@ path_search_result astar::Dijkstra(world& w, point from_, point to_, object_id o
DBG_nospace << "dijkstra: closest px:" << closest << " path:" << closest_path_len
<< " pos:" << closest_pos.coord.to_signed() << ";" << closest_pos.offset
<< " nodes:" << nodes.size()
-#ifndef FM_ASTAR_NO_EDGE_CACHE
+#if !FM_ASTAR_NO_EDGE_CACHE
<< " edges:" << edges.size()
#endif
;
diff --git a/src/path-search.hpp b/src/path-search.hpp
index 232410d5..8a6dd768 100644
--- a/src/path-search.hpp
+++ b/src/path-search.hpp
@@ -90,7 +90,7 @@ private:
#define FM_ASTAR_NO_EDGE_CACHE 1
-#ifndef FM_ASTAR_NO_EDGE_CACHE
+#if !FM_ASTAR_NO_EDGE_CACHE
struct edge
{
global_coords from, to;