File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -133,22 +133,9 @@ function Compare(AList: TStringList; AIndex1, AIndex2: Integer): Integer;
133133
134134procedure TMyDictionary.InternalFind (const aKey: Cardinal; out aFound: Boolean; out aIndex: Integer);
135135var vIdx: Integer;
136- vDbl: Double;
137136 vOffset: Integer;
138137begin
139- { $IFDEF HASHMULT}
140- vDbl := aKey * cHashConst;
141- vDbl := vDbl - Trunc (vDbl);
142- vIdx := Trunc (vDbl * cDictSize);
143- { $ENDIF}
144- { $IFDEF LEMIRE}
145138 vIdx := aKey * cDictSize shr 32 ;
146- { $ENDIF}
147- { $IFDEF HASHMOD}
148- vIdx := aKey mod cDictSize;
149- { $ENDIF}
150-
151- aFound := False;
152139
153140 if FHashes[vIdx] = aKey then begin
154141 aIndex := vIdx;
@@ -170,8 +157,8 @@ procedure TMyDictionary.InternalFind(const aKey: Cardinal; out aFound: Boolean;
170157 aIndex := vIdx;
171158 aFound := True;
172159 break;
173- end
174- else if FHashes[vIdx] = 0 then begin
160+ end ;
161+ if FHashes[vIdx] = 0 then begin
175162 // found empty bucket to use
176163 aIndex := vIdx;
177164 aFound := False;
You can’t perform that action at this time.
0 commit comments