Recent

Author Topic: Adventures in Generics  (Read 7429 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 654
Re: Adventures in Generics
« Reply #15 on: February 21, 2016, 03:43:34 pm »
The eagle-eyed amongst you will no doubt have spotted the glaring error...
Code: Pascal  [Select][+][-]
  1. procedure TcaVectorBase.Assign(Source: TcaVectorBase);
  2. var
  3.   Index: Integer;
  4.   P: Pointer;
  5. begin
  6.   Clear;
  7.   for Index := 0 to Pred(Source.Count) do
  8.     begin
  9.       GetMem(P, GetElementSize);
  10.       Move(Source.Pointers[Index]^, P^ {missing ^}, GetElementSize);
  11.       FList.Add(P);
  12.     end;
  13. end;
  14.  
Cheers,
Carl
"It builds... ship it!"

 

TinyPortal © 2005-2018