From 22ffe8ce44bc2744bea50bf355be347b1b82670a Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 20 Apr 2018 09:48:33 +0100 Subject: [PATCH] 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. --- src/alert.h | 1 - src/primitives/block.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/alert.h b/src/alert.h index bf29e854c..4e3b88775 100644 --- a/src/alert.h +++ b/src/alert.h @@ -51,7 +51,6 @@ public: template inline void SerializationOp(Stream& s, Operation ser_action) { READWRITE(this->nVersion); - nVersion = this->nVersion; READWRITE(nRelayUntil); READWRITE(nExpiration); READWRITE(nID); diff --git a/src/primitives/block.h b/src/primitives/block.h index 1d8750588..f6eeebcbb 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -42,7 +42,6 @@ public: template inline void SerializationOp(Stream& s, Operation ser_action) { READWRITE(this->nVersion); - nVersion = this->nVersion; READWRITE(hashPrevBlock); READWRITE(hashMerkleRoot); READWRITE(hashReserved);