diff options
author | Sebastian Geerken <devnull@localhost> | 2014-03-01 21:26:25 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-03-01 21:26:25 +0100 |
commit | 975ba73389d2de0cd2bb50183bd988eab6ba0e06 (patch) | |
tree | 67947a7e22dd049685dc034223c212e2ae14c902 /lout/container.cc | |
parent | 6369c18d186d52f0f3f5082ff6c9fdcf5c9285d1 (diff) | |
parent | 8818cda9ca4e4c19c4c5fcee68460d5ba0cd5ba2 (diff) |
Merge with main repo.
Diffstat (limited to 'lout/container.cc')
-rw-r--r-- | lout/container.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lout/container.cc b/lout/container.cc index 602553d3..dcac4726 100644 --- a/lout/container.cc +++ b/lout/container.cc @@ -428,7 +428,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) { @@ -462,7 +462,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) { @@ -578,7 +578,7 @@ HashTable::~HashTable() PRINTF ("- deleting value: %s\n", value->toString()); delete value; } - } + } } } } @@ -612,7 +612,7 @@ void HashTable::intoStringBuffer(misc::StringBuffer *sb) node->object->intoStringBuffer(sb); sb->append(" => "); - + Object *value = ((KeyValuePair*)node)->value; if (value) value->intoStringBuffer(sb); @@ -632,7 +632,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) |