diff --git a/include/util/query_heap.hpp b/include/util/query_heap.hpp index 9ded36c9e..e2678f2c0 100644 --- a/include/util/query_heap.hpp +++ b/include/util/query_heap.hpp @@ -15,48 +15,6 @@ namespace osrm::util { -template class GenerationArrayStorage -{ - using GenerationCounter = std::uint16_t; - - public: - explicit GenerationArrayStorage(std::size_t size) - : positions(size, 0), generation(1), generations(size, 0) - { - } - - Key &operator[](NodeID node) - { - generation[node] = generation; - return positions[node]; - } - - Key peek_index(const NodeID node) const - { - if (generations[node] < generation) - { - return std::numeric_limits::max(); - } - return positions[node]; - } - - void Clear() - { - generation++; - // if generation overflows we end up at 0 again and need to clear the vector - if (generation == 0) - { - generation = 1; - std::fill(generations.begin(), generations.end(), 0); - } - } - - private: - GenerationCounter generation; - std::vector generations; - std::vector positions; -}; - template class ArrayStorage { public: @@ -72,29 +30,6 @@ template class ArrayStorage std::vector positions; }; -template class MapStorage -{ - public: - explicit MapStorage(std::size_t) {} - - Key &operator[](NodeID node) { return nodes[node]; } - - void Clear() { nodes.clear(); } - - Key peek_index(const NodeID node) const - { - const auto iter = nodes.find(node); - if (nodes.end() != iter) - { - return iter->second; - } - return std::numeric_limits::max(); - } - - private: - std::map nodes; -}; - template class UnorderedMapStorage { public: diff --git a/unit_tests/util/query_heap.cpp b/unit_tests/util/query_heap.cpp index bca90fc73..881616301 100644 --- a/unit_tests/util/query_heap.cpp +++ b/unit_tests/util/query_heap.cpp @@ -22,9 +22,8 @@ struct TestData using TestNodeID = NodeID; using TestKey = int; using TestWeight = int; -using storage_types = boost::mpl::list, - MapStorage, - UnorderedMapStorage>; +using storage_types = + boost::mpl::list, UnorderedMapStorage>; template struct RandomDataFixture {