Small scope refactoring (#18263)
* Small scope refactoring * Add test for #10251 * Add inline where appropriate
This commit is contained in:
parent
0adb47aa15
commit
8c42f5be02
4 changed files with 33 additions and 24 deletions
|
|
@ -777,9 +777,10 @@ proc strTableInclReportConflict*(t: var TStrTable, n: PSym;
|
|||
replaceSlot = h
|
||||
h = nextTry(h, high(t.data))
|
||||
if replaceSlot >= 0:
|
||||
result = t.data[replaceSlot] # found it
|
||||
if not onConflictKeepOld:
|
||||
t.data[replaceSlot] = n # overwrite it with newer definition!
|
||||
return t.data[replaceSlot] # found it
|
||||
return result
|
||||
elif mustRehash(t.data.len, t.counter):
|
||||
strTableEnlarge(t)
|
||||
strTableRawInsert(t.data, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue