Skip to content

Commit

Permalink
Merge branch 'simba2000' of https://github.com/Villavu/Simba into sim…
Browse files Browse the repository at this point in the history
…ba2000
  • Loading branch information
ollydev committed Jul 5, 2024
2 parents 0a22266 + 0634058 commit c0eefc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/simba.array_algorithm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ class function TArrayIndexOf.IndexOf(Item: _T; Arr: TArr): Integer;
if (not IsManagedType(_T)) and (SizeOf(_T) in [1,2,4,8]) then
begin
case SizeOf(_T) of
1: Result := IndexByte(Arr[0], Length(Arr) * SizeOf(_T), PByte(@Item)^);
2: Result := IndexWord(Arr[0], Length(Arr) * SizeOf(_T), PWord(@Item)^);
4: Result := IndexDWord(Arr[0], Length(Arr) * SizeOf(_T), PDWord(@Item)^);
8: Result := IndexQWord(Arr[0], Length(Arr) * SizeOf(_T), PQWord(@Item)^);
1: Result := IndexByte(Arr[0], Length(Arr), PByte(@Item)^);
2: Result := IndexWord(Arr[0], Length(Arr), PWord(@Item)^);
4: Result := IndexDWord(Arr[0], Length(Arr), PDWord(@Item)^);
8: Result := IndexQWord(Arr[0], Length(Arr), PQWord(@Item)^);
end;
Exit;
end;
Expand Down

0 comments on commit c0eefc1

Please sign in to comment.