COMMON: Fix (harmless) int <-> uint mismatch

This commit is contained in:
Max Horn 2011-03-30 13:34:31 +02:00
parent a4eea36b84
commit c4ae3b90db
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;