aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2011-03-30 13:34:31 +0200
committerMax Horn2011-04-04 09:53:26 +0200
commitc4ae3b90db9fe28130c00e9736fdc388088e7a35 (patch)
tree891c936fa98ac1eac5987e6b8cc33bad82e08d59 /common
parenta4eea36b84b60db158fa14e15a620a6f3e72cc37 (diff)
downloadscummvm-rg350-c4ae3b90db9fe28130c00e9736fdc388088e7a35.tar.gz
scummvm-rg350-c4ae3b90db9fe28130c00e9736fdc388088e7a35.tar.bz2
scummvm-rg350-c4ae3b90db9fe28130c00e9736fdc388088e7a35.zip
COMMON: Fix (harmless) int <-> uint mismatch
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;