Changeset 441 for Generics/TemplateGenerics/Additional
- Timestamp:
- Nov 19, 2012, 2:47:07 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Additional/UBinarySerializer.pas
r410 r441 25 25 Position: Integer; 26 26 OwnsList: Boolean; 27 procedure Write(var Buffer; Count: Integer); inline;28 procedure Read(var Buffer; Count: Integer); inline;27 procedure Write(var Buffer; Count: Integer); //inline; 28 procedure Read(var Buffer; Count: Integer); //inline; 29 29 30 30 procedure Assign(Source: TBinarySerializer); … … 73 73 StringLength: Longint; 74 74 begin 75 FList.ReadBuffer(StringLength, SizeOf(StringLength)); 75 StringLength := 0; 76 Read(StringLength, SizeOf(StringLength)); 76 77 Result := ReadString(StringLength); 77 78 end; … … 102 103 function TBinarySerializer.ReadByte: Byte; 103 104 begin 105 Result := 0; 104 106 Read(Result, SizeOf(Byte)); 105 107 end; … … 107 109 function TBinarySerializer.ReadCardinal: Cardinal; 108 110 begin 111 Result := 0; 109 112 Read(Result, SizeOf(Cardinal)); 110 113 if SwapData then Result := SwapEndian(Result); … … 113 116 function TBinarySerializer.ReadInt64: Int64; 114 117 begin 118 Result := 0; 115 119 Read(Result, SizeOf(Int64)); 116 120 if SwapData then Result := SwapEndian(Result); … … 129 133 Count: Byte; 130 134 begin 135 Count := 0; 131 136 Read(Count, 1); 132 137 Result := ReadString(Count); … … 223 228 function TBinarySerializer.ReadDouble: Double; 224 229 begin 230 Result := 0; 225 231 Read(Result, SizeOf(Double)); 226 232 end; … … 228 234 function TBinarySerializer.ReadSingle: Single; 229 235 begin 236 Result := 0; 230 237 Read(Result, SizeOf(Single)); 231 238 end; … … 233 240 function TBinarySerializer.ReadWord: Word; 234 241 begin 242 Result := 0; 235 243 Read(Result, SizeOf(Word)); 236 244 if SwapData then Result := SwapEndian(Result);
Note:
See TracChangeset
for help on using the changeset viewer.