aboutsummaryrefslogtreecommitdiff
path: root/lout/container.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-02-16 00:27:28 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-02-16 00:27:28 +0100
commit950e73503f41ab65396271d02e0331b85f302b29 (patch)
tree26f60a1ae95dbfd45cd7e6425220446774b82a42 /lout/container.cc
parent7167b40921d0e0b47fa9ebdf9b5abe9db8752f59 (diff)
lout: mark getters as const
Diffstat (limited to 'lout/container.cc')
-rw-r--r--lout/container.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lout/container.cc b/lout/container.cc
index de7b93e2..d3385137 100644
--- a/lout/container.cc
+++ b/lout/container.cc
@@ -412,7 +412,7 @@ void HashSet::clearNode(HashSet::Node *node)
}
}
-HashSet::Node *HashSet::findNode(Object *object)
+HashSet::Node *HashSet::findNode(Object *object) const
{
int h = calcHashValue(object);
for (Node *node = table[h]; node; node = node->next) {
@@ -446,7 +446,7 @@ void HashSet::put(Object *object)
insertNode (object);
}
-bool HashSet::contains(Object *object)
+bool HashSet::contains(Object *object) const
{
int h = calcHashValue(object);
for (Node *n = table[h]; n; n = n->next) {
@@ -616,7 +616,7 @@ void HashTable::put(Object *key, Object *value)
node->value = value;
}
-Object *HashTable::get(Object *key)
+Object *HashTable::get(Object *key) const
{
Node *node = findNode(key);
if (node)