Browse Source

Remove now-unshadowed serialization lines that do nothing

Previously we had both nVersion as a class parameter *and* a serialization
argument, and in several inherited serializers the latter was set to the former,
in order to pass the serialized object's version into underlying parsers. #3180
pulled in the upstream changes to clean this up, and in doing so these lines
became no-ops - setting the class parameter to itself. Clang throws warnings on
this, which turn into errors on the MacOS builder.

We can just remove these, because upstream already had done so in earlier PRs,
indicating that they were not being relied on by underlying parsers.
pull/4/head
Jack Grigg 6 years ago
parent
commit
22ffe8ce44
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 1
      src/alert.h
  2. 1
      src/primitives/block.h

1
src/alert.h

@ -51,7 +51,6 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(this->nVersion);
nVersion = this->nVersion;
READWRITE(nRelayUntil);
READWRITE(nExpiration);
READWRITE(nID);

1
src/primitives/block.h

@ -42,7 +42,6 @@ public:
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(this->nVersion);
nVersion = this->nVersion;
READWRITE(hashPrevBlock);
READWRITE(hashMerkleRoot);
READWRITE(hashReserved);

Loading…
Cancel
Save