mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
COMMON: Fix (harmless) int <-> uint mismatch
This commit is contained in:
parent
a4eea36b84
commit
c4ae3b90db
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user