Changeset 572 for CoolStreaming/VarBlockSerializer.pas
- Timestamp:
- Jun 25, 2024, 1:37:11 AM (4 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
CoolStreaming/VarBlockSerializer.pas
r571 r572 1 // 2011-02-22 2 3 unit UVarBlockSerializer; 4 5 {$mode Delphi}{$H+} 1 unit VarBlockSerializer; 6 2 7 3 // One level of recursive VarInt size supported … … 11 7 12 8 uses 13 Classes, DateUtils, UStreamHelper, Math, SysUtils, USubStream,9 Classes, DateUtils, StreamHelper, Math, SysUtils, SubStream, LazUTF8, 14 10 SpecializedList, LCLProc; 15 11 … … 119 115 end; 120 116 117 121 118 implementation 122 119 … … 191 188 // Get bit length 192 189 Length := SizeOf(QWord) * BitAlignment; 193 while (( (Value shr Length) and 1) = 0) and (Length > 0) do190 while ((Value and (QWord(1) shl (Length - 1))) = 0) and (Length > 0) do 194 191 Dec(Length); 195 192 Inc(Length); … … 698 695 constructor TVarBlockSerializer.Create; 699 696 begin 700 inherited Create;697 inherited; 701 698 Stream := TStreamHelper.Create; 702 699 OwnsStream := True; … … 707 704 begin 708 705 if OwnsStream then begin 709 Stream.Free;710 end; 711 inherited Destroy;706 FreeAndNil(FStream); 707 end; 708 inherited; 712 709 end; 713 710
Note:
See TracChangeset
for help on using the changeset viewer.