summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/queue.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-10-02 19:39:34 +0000
committeralberth <alberth@openttd.org>2010-10-02 19:39:34 +0000
commit4ed94825b2b149cc7da7d1827c4bc26988e72f03 (patch)
tree325efbef81042c3a6d2092f06fedcd093c7b6b91 /src/pathfinder/npf/queue.cpp
parent6ea5643e400f8a18059ba74c2f2fd319389a6440 (diff)
downloadopenttd-4ed94825b2b149cc7da7d1827c4bc26988e72f03.tar.xz
(svn r20881) -Codechange: Make Hash_Get a method.
Diffstat (limited to 'src/pathfinder/npf/queue.cpp')
-rw-r--r--src/pathfinder/npf/queue.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pathfinder/npf/queue.cpp b/src/pathfinder/npf/queue.cpp
index f1ac7af36..473f50c70 100644
--- a/src/pathfinder/npf/queue.cpp
+++ b/src/pathfinder/npf/queue.cpp
@@ -502,9 +502,13 @@ void *Hash_Set(Hash *h, uint key1, uint key2, void *value)
return NULL;
}
-void *Hash_Get(const Hash *h, uint key1, uint key2)
+/**
+ * Gets the value associated with the given key pair, or NULL when it is not
+ * present.
+ */
+void *Hash::Get(uint key1, uint key2) const
{
- HashNode *node = Hash_FindNode(h, key1, key2, NULL);
+ HashNode *node = Hash_FindNode(this, key1, key2, NULL);
#ifdef HASH_DEBUG
debug("Found node: %p", node);