From 9432d35f14a862dca021672569a1b1b49d2d824f Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 24 Sep 2012 14:45:44 -0700 Subject: [PATCH] You don't need to customize operator=(const&) since the base class does it for you. --- src/Amount.cpp | 15 --------------- src/SerializedTypes.h | 1 - 2 files changed, 16 deletions(-) diff --git a/src/Amount.cpp b/src/Amount.cpp index ebd2597a99..f0692f2af7 100644 --- a/src/Amount.cpp +++ b/src/Amount.cpp @@ -522,21 +522,6 @@ STAmount STAmount::operator-(void) const return STAmount(name, mCurrency, mIssuer, mValue, mOffset, mIsNative, !mIsNegative); } -STAmount& STAmount::operator=(const STAmount &a) -{ - if (name == NULL) - name = a.name; - - mCurrency = a.mCurrency; - mIssuer = a.mIssuer; - mValue = a.mValue; - mOffset = a.mOffset; - mIsNative = a.mIsNative; - mIsNegative = a.mIsNegative; - - return *this; -} - STAmount& STAmount::operator=(uint64 v) { // does not copy name, does not change currency type mOffset = 0; diff --git a/src/SerializedTypes.h b/src/SerializedTypes.h index fef6664123..6c9099df50 100644 --- a/src/SerializedTypes.h +++ b/src/SerializedTypes.h @@ -348,7 +348,6 @@ public: STAmount operator-(uint64) const; STAmount operator-(void) const; - STAmount& operator=(const STAmount&); STAmount& operator+=(const STAmount&); STAmount& operator-=(const STAmount&); STAmount& operator+=(uint64);