aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/hashmap.h8
-rw-r--r--common/list.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/common/hashmap.h b/common/hashmap.h
index b645a37b01..233d7f5b16 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -142,8 +142,8 @@ private:
}
void assign(const HM_t &map);
- int lookup(const Key &key) const;
- int lookupAndCreateIfMissing(const Key &key);
+ uint lookup(const Key &key) const;
+ uint lookupAndCreateIfMissing(const Key &key);
void expandStorage(uint newCapacity);
#if !defined(__sgi) || defined(__GNUC__)
@@ -456,7 +456,7 @@ void HashMap<Key, Val, HashFunc, EqualFunc>::expandStorage(uint newCapacity) {
}
template<class Key, class Val, class HashFunc, class EqualFunc>
-int HashMap<Key, Val, HashFunc, EqualFunc>::lookup(const Key &key) const {
+uint HashMap<Key, Val, HashFunc, EqualFunc>::lookup(const Key &key) const {
const uint hash = _hash(key);
uint ctr = hash & _mask;
for (uint perturb = hash; ; perturb >>= HASHMAP_PERTURB_SHIFT) {
@@ -487,7 +487,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookup(const Key &key) const {
}
template<class Key, class Val, class HashFunc, class EqualFunc>
-int HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key &key) {
+uint HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key &key) {
const uint hash = _hash(key);
uint ctr = hash & _mask;
const uint NONE_FOUND = _mask + 1;
diff --git a/common/list.h b/common/list.h
index f3bc1df35e..ad6193c297 100644
--- a/common/list.h
+++ b/common/list.h
@@ -185,7 +185,7 @@ public:
}
uint size() const {
- int n = 0;
+ uint n = 0;
for (const NodeBase *cur = _anchor._next; cur != &_anchor; cur = cur->_next)
++n;
return n;