Changeset 129 for Generics/TemplateGenerics/Generic
- Timestamp:
- Jan 17, 2011, 6:55:36 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/GenericList.inc
r114 r129 110 110 function TGList.Get(Index: TGListIndex): TGListItem; 111 111 begin 112 if (Index < 0) or (Index >= Count) then 113 raise EListError.CreateFmt(SListIndexError, [Index]); 112 114 Result := FItems[Index]; 113 115 end; … … 115 117 procedure TGList.Put(Index: TGListIndex; const AValue: TGListItem); 116 118 begin 119 if (Index < 0) or (Index >= Count) then 120 raise EListError.CreateFmt(SListIndexError, [Index]); 117 121 FItems[Index] := AValue; 118 122 end; … … 175 179 I := 0; 176 180 while I < Count do begin 177 Items[I] := Source[I];181 FItems[I] := Source[I]; 178 182 I := I + 1; 179 183 end; … … 247 251 raise EListError.CreateFmt(SListIndexError, [0]) 248 252 else 249 Result := Items[FCount - 1];253 Result := FItems[FCount - 1]; 250 254 end; 251 255 … … 255 259 raise EListError.CreateFmt(SListIndexError, [0]) 256 260 else 257 Items[FCount - 1] := AValue;261 FItems[FCount - 1] := AValue; 258 262 end; 259 263 … … 263 267 raise EListError.CreateFmt(SListIndexError, [0]) 264 268 else 265 Result := Items[0];269 Result := FItems[0]; 266 270 end; 267 271 … … 271 275 raise EListError.CreateFmt(SListIndexError, [0]) 272 276 else 273 Items[0] := AValue;277 FItems[0] := AValue; 274 278 end; 275 279 … … 401 405 I := 0; 402 406 while I < Count do begin 403 Result := Result + Converter( Items[I]);407 Result := Result + Converter(FItems[I]); 404 408 if I < (Count - 1) then 405 409 Result := Result + Separator; … … 469 473 I := Start; 470 474 while I < Count do begin 471 Items[I] := Value;475 FItems[I] := Value; 472 476 I := I + 1; 473 477 end;
Note:
See TracChangeset
for help on using the changeset viewer.