The 'TLongExpFloat' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
The 'TState' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
Change-Id: I818c8b33eecdddc23654a857926817d937ec8064
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
return(m_base == b.m_base && m_exp == b.m_exp);
}
+TLongExpFloat&
+TLongExpFloat::operator=(const TLongExpFloat& b)
+{
+ if (m_base == b.m_base && m_exp == b.m_exp)
+ return *this;
+
+ m_base = b.m_base;
+ m_exp = b.m_exp;
+
+ return *this;
+}
+
void
TLongExpFloat::toString(std::string& str) const
{
bool
operator==(const TLongExpFloat& b) const;
+ TLongExpFloat&
+ operator=(const TLongExpFloat& b);
+
void
toString(std::string& str) const;
bool operator<(const TState & b) const {
return unsigned(*this) < unsigned(b);
}
+ TState& operator=(const TState& b) {
+ if (m_all == b.m_all)
+ return *this;
+
+ m_all = b.m_all;
+ return *this;
+ }
private:
unsigned int m_all;