From 5b5e9296b330ac922c4df281f5ea4330d1ce308d Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Sun, 3 Feb 2013 14:54:22 +0100 Subject: [PATCH] Adding const to parameter and rehash to give map 1000 buckets --- DataStructures/BinaryHeap.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DataStructures/BinaryHeap.h b/DataStructures/BinaryHeap.h index 85c14d456..f8b34704f 100644 --- a/DataStructures/BinaryHeap.h +++ b/DataStructures/BinaryHeap.h @@ -75,10 +75,13 @@ template< typename NodeID, typename Key > class UnorderedMapStorage { public: - UnorderedMapStorage( size_t ) { } + UnorderedMapStorage( size_t ) { + //hash table gets 1000 Buckets + nodes.rehash(1000); + } - Key &operator[]( NodeID node ) { - return nodes[node]; + Key &operator[]( const NodeID node ) { + return nodes[node]; } void Clear() {