mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
scripted-diff: Remove trailing whitespaces
-BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT-
This commit is contained in:
@@ -173,11 +173,11 @@ template<typename X> const X& ReadWriteAsHelper(const X& x) { return x; }
|
||||
#define READWRITE(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
|
||||
#define READWRITEAS(type, obj) (::SerReadWriteMany(s, ser_action, ReadWriteAsHelper<type>(obj)))
|
||||
|
||||
/**
|
||||
/**
|
||||
* Implement three methods for serializable objects. These are actually wrappers over
|
||||
* "SerializationOp" template, which implements the body of each class' serialization
|
||||
* code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be
|
||||
* added as members.
|
||||
* added as members.
|
||||
*/
|
||||
#define ADD_SERIALIZE_METHODS \
|
||||
template<typename Stream> \
|
||||
@@ -312,16 +312,16 @@ uint64_t ReadCompactSize(Stream& is)
|
||||
* sure the encoding is one-to-one, one is subtracted from all but the last digit.
|
||||
* Thus, the byte sequence a[] with length len, where all but the last byte
|
||||
* has bit 128 set, encodes the number:
|
||||
*
|
||||
*
|
||||
* (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1))
|
||||
*
|
||||
*
|
||||
* Properties:
|
||||
* * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes)
|
||||
* * Every integer has exactly one encoding
|
||||
* * Encoding does not depend on size of original integer type
|
||||
* * No redundancy: every (infinite) byte sequence corresponds to a list
|
||||
* of encoded integers.
|
||||
*
|
||||
*
|
||||
* 0: [0x00] 256: [0x81 0x00]
|
||||
* 1: [0x01] 16383: [0xFE 0x7F]
|
||||
* 127: [0x7F] 16384: [0xFF 0x00]
|
||||
|
||||
Reference in New Issue
Block a user