Changeset 196 for branches/virtcpu varint/UVarInt.pas
- Timestamp:
- Sep 22, 2019, 7:13:15 PM (5 years ago)
- Location:
- branches/virtcpu varint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/virtcpu varint
-
Property svn:ignore
set to
lib
virtcpu
virtcpu.lps
-
Property svn:ignore
set to
-
branches/virtcpu varint/UVarInt.pas
r195 r196 32 32 class operator Explicit(A: TVarInt): Int64; 33 33 class operator Inc(A: TVarInt): TVarInt; 34 class operator Inc(A: TVarInt; B: Integer): TVarInt;34 class operator Inc(A: TVarInt; B: TVarInt): TVarInt; 35 35 class operator Dec(A: TVarInt): TVarInt; 36 class operator Dec(A: TVarInt; B: TVarInt): TVarInt; 36 37 class operator Negative(A: TVarInt): TVarInt; 37 38 class operator Add(A: TVarInt; B: TVarInt): TVarInt; … … 75 76 class operator Explicit(A: TVarUInt): Int64; 76 77 class operator Inc(A: TVarUInt): TVarUInt; 77 class operator Inc(A: TVarUInt; B: Integer): TVarUInt;78 class operator Inc(A: TVarUInt; B: TVarInt): TVarUInt; 78 79 class operator Dec(A: TVarUInt): TVarUInt; 80 class operator Dec(A: TVarUInt; B: TVarUInt): TVarUInt; 79 81 class operator Negative(A: TVarUInt): TVarUInt; 80 82 class operator Add(A: TVarUInt; B: TVarUInt): TVarUInt; … … 191 193 end; 192 194 193 class operator TVarUInt.Inc(A: TVarUInt; B: Integer): TVarUInt;194 begin 195 Result.Value := A.Value + B ;195 class operator TVarUInt.Inc(A: TVarUInt; B: TVarInt): TVarUInt; 196 begin 197 Result.Value := A.Value + B.Value; 196 198 end; 197 199 … … 199 201 begin 200 202 Result.Value := A.Value - 1; 203 end; 204 205 class operator TVarUInt.Dec(A: TVarUInt; B: TVarUInt): TVarUInt; 206 begin 207 Result.Value := A.Value - B.Value; 201 208 end; 202 209 … … 424 431 end; 425 432 426 class operator TVarInt.Inc(A: TVarInt; B: Integer): TVarInt;427 begin 428 Result := A.Value + B ;433 class operator TVarInt.Inc(A: TVarInt; B: TVarInt): TVarInt; 434 begin 435 Result := A.Value + B.Value; 429 436 end; 430 437 … … 432 439 begin 433 440 Result.Value := A.Value - 1; 441 end; 442 443 class operator TVarInt.Dec(A: TVarInt; B: TVarInt): TVarInt; 444 begin 445 Result.Value := A.Value - B.Value; 434 446 end; 435 447
Note:
See TracChangeset
for help on using the changeset viewer.