vif hash: move bucket size check in the 'add' path instead of 'find' path

More logical this way
This commit is contained in:
Gregory Hainaut 2016-11-26 09:54:24 +01:00
parent c9db1c6c4b
commit 9862e5d207
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,6 @@ public:
if( (result&0x7) == 0x7 ) return (T*)chainpos;
}
if( bucket.Size > 3 ) DevCon.Warning( "recVifUnpk: Bucket 0x%04x has %d micro-programs", d % hSize, bucket.Size );
return NULL;
}
__fi void add(const T& dataPtr) {
@ -94,6 +93,7 @@ public:
);
}
memcpy(&bucket.Chain[bucket.Size++], &dataPtr, sizeof(T));
if( bucket.Size > 3 ) DevCon.Warning( "recVifUnpk: Bucket 0x%04x has %d micro-programs", d % hSize, bucket.Size );
}
void clear() {
for (int i = 0; i < hSize; i++) {