diff --git a/src/Amount.cpp b/src/Amount.cpp index e6616a9c35..966eea15b6 100644 --- a/src/Amount.cpp +++ b/src/Amount.cpp @@ -491,18 +491,6 @@ STAmount STAmount::operator-(void) const return STAmount(name, mCurrency, mValue, mOffset, mIsNative, !mIsNegative); } -STAmount& STAmount::operator=(const STAmount& a) -{ - mValue = a.mValue; - mOffset = a.mOffset; - mIssuer = a.mIssuer; - mCurrency = a.mCurrency; - 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.cpp b/src/SerializedTypes.cpp index da96fa5373..2a6b0f978e 100644 --- a/src/SerializedTypes.cpp +++ b/src/SerializedTypes.cpp @@ -463,14 +463,6 @@ std::string STPathSet::getText() const } #endif -STPathSet& STPathSet::operator=(const STPathSet& p) -{ - if (name == NULL) - name = p.name; - value = p.value; - return *this; -} - void STPathSet::add(Serializer& s) const { bool bFirst = true; diff --git a/src/SerializedTypes.h b/src/SerializedTypes.h index 7b7aa562b9..2c877b8bd1 100644 --- a/src/SerializedTypes.h +++ b/src/SerializedTypes.h @@ -91,6 +91,8 @@ public: virtual bool isEquivalent(const SerializedType& t) const { assert(getSType() == STI_NOTPRESENT); return t.getSType() == STI_NOTPRESENT; } + SerializedType& operator=(const SerializedType& t) + { name = (name == NULL) ? t.name : name; return *this; } bool operator==(const SerializedType& t) const { return (getSType() == t.getSType()) && isEquivalent(t); } bool operator!=(const SerializedType& t) const @@ -124,7 +126,6 @@ public: void setValue(unsigned char v) { value=v; } operator unsigned char() const { return value; } - STUInt8& operator=(unsigned char v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -152,7 +153,6 @@ public: void setValue(uint16 v) { value=v; } operator uint16() const { return value; } - STUInt16& operator=(uint16 v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -180,7 +180,6 @@ public: void setValue(uint32 v) { value=v; } operator uint32() const { return value; } - STUInt32& operator=(uint32 v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -208,7 +207,6 @@ public: void setValue(uint64 v) { value=v; } operator uint64() const { return value; } - STUInt64& operator=(uint64 v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -334,7 +332,6 @@ public: STAmount& operator+=(const STAmount&); STAmount& operator-=(const STAmount&); - STAmount& operator=(const STAmount&); STAmount& operator+=(uint64); STAmount& operator-=(uint64); STAmount& operator=(uint64); @@ -401,7 +398,6 @@ public: void setValue(const uint128& v) { value=v; } operator uint128() const { return value; } - STHash128& operator=(const uint128& v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -431,7 +427,6 @@ public: void setValue(const uint160& v) { value=v; } operator uint160() const { return value; } - STHash160& operator=(const uint160& v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -461,7 +456,6 @@ public: void setValue(const uint256& v) { value=v; } operator uint256() const { return value; } - STHash256& operator=(const uint256& v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -494,7 +488,6 @@ public: void setValue(const std::vector& v) { value=v; } operator std::vector() const { return value; } - STVariableLength& operator=(const std::vector& v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; }; @@ -668,7 +661,6 @@ public: void addPath(const STPath& e) { value.push_back(e); } virtual bool isEquivalent(const SerializedType& t) const; - STPathSet& operator=(const STPathSet&); std::vector::iterator begin() { return value.begin(); } std::vector::iterator end() { return value.end(); } @@ -747,7 +739,6 @@ public: void addItem(const TaggedListItem& v) { value.push_back(v); } operator std::vector() const { return value; } - STTaggedList& operator=(const std::vector& v) { value=v; return *this; } virtual bool isEquivalent(const SerializedType& t) const; };