summaryrefslogtreecommitdiffhomepage
path: root/src/path-search-result.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/path-search-result.cpp')
-rw-r--r--src/path-search-result.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/path-search-result.cpp b/src/path-search-result.cpp
index 995ad710..202a8457 100644
--- a/src/path-search-result.cpp
+++ b/src/path-search-result.cpp
@@ -42,6 +42,7 @@ path_search_result::path_search_result(const path_search_result& x) noexcept
auto self = path_search_result{};
self._node->vec = x._node->vec;
_node = std::move(self._node);
+ _cost = x._cost;
}
path_search_result& path_search_result::operator=(const path_search_result& x) noexcept
@@ -50,11 +51,14 @@ path_search_result& path_search_result::operator=(const path_search_result& x) n
fm_debug_assert(!_node->_next);
if (&x != this)
_node->vec = x._node->vec;
+ _cost = x._cost;
return *this;
}
path_search_result::node::node() noexcept = default;
size_t path_search_result::size() const { return _node->vec.size(); }
+uint32_t path_search_result::cost() const { return _cost; }
+void path_search_result::set_cost(uint32_t value) { _cost = value; }
auto path_search_result::data() const -> const point* { return _node->vec.data(); }
path_search_result::operator bool() const { return !_node->vec.empty(); }