From: Ketmar Dark Date: Mon, 21 Aug 2017 11:53:36 +0000 (+0300) Subject: hashtable cosmetix X-Git-Url: https://deadsoftware.ru/gitweb?a=commitdiff_plain;h=630b58ef337cdd394937af2f809a3e86d0a45537;p=d2df-sdl.git hashtable cosmetix --- diff --git a/src/shared/hashtable.pas b/src/shared/hashtable.pas index 8b75d54..7dbbb26 100644 --- a/src/shared/hashtable.pas +++ b/src/shared/hashtable.pas @@ -283,7 +283,7 @@ begin begin newsz := Length(mBuckets); if (Length(mEntries) <> newsz) then raise Exception.Create('internal error in hash table (resize)'); - if (newsz <= 1024*1024*512) then newsz *= 2 else newsz += 1024*1024; + if (newsz <= 1024*1024*1024) then newsz *= 2 else raise Exception.Create('hash table too big'); {$IFDEF RBHASH_DEBUG_RESIZE} writeln('resizing hash; used=', mBucketsUsed, '; total=', blen, '; maxload=', blen*LoadFactorPrc div 100, '; newsz=', newsz); {$ENDIF}