Browse Source

+ support 16-bit pointer size in TFPGObjectList.IndexOf

Nikolay Nikolov 2 years ago
parent
commit
34471a6403
1 changed files with 3 additions and 1 deletions
  1. 3 1
      rtl/objpas/fgl.pp

+ 3 - 1
rtl/objpas/fgl.pp

@@ -1128,7 +1128,9 @@ end;
 function TFPGObjectList.IndexOf(const Item: T): Integer;
 function TFPGObjectList.IndexOf(const Item: T): Integer;
 begin
 begin
   Result :=
   Result :=
-{$if sizeof(pointer) = sizeof(dword)}
+{$if sizeof(pointer) = sizeof(word)}
+    IndexWord
+{$elseif sizeof(pointer) = sizeof(dword)}
     IndexDWord
     IndexDWord
 {$elseif sizeof(pointer) = sizeof(qword)}
 {$elseif sizeof(pointer) = sizeof(qword)}
     IndexQWord
     IndexQWord