Ignore:
Timestamp:
Jan 3, 2012, 10:36:55 AM (13 years ago)
Author:
chronos
Message:
  • Modified: Assign methods of TStreamHelper, TVarBlockSerializer and TVarBlockIndexed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CoolStreaming/UStreamHelper.pas

    r291 r307  
    2323    procedure SetItem(Index: Integer; const AValue: Byte);
    2424  public
     25    procedure Assign(Source: TStreamHelper);
    2526    procedure WriteByte(Data: Byte);
    2627    procedure WriteWord(Data: Word);
     
    281282end;
    282283
     284procedure TStreamHelper.Assign(Source: TStreamHelper);
     285var
     286  OldPosition: Integer;
     287begin
     288  OldPosition := Source.Position;
     289  Clear;
     290  WriteStream(Source, Source.Size);
     291  Source.Position := OldPosition;
     292  Position := OldPosition;
     293end;
     294
    283295procedure TStreamHelper.WriteAnsiString(Data: string);
    284296var
Note: See TracChangeset for help on using the changeset viewer.