mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
compound assignments should implement the operation themself.
rather than depends on binary arithmetic operators, instead, binary arithmetic operators should reuse compound assignments.
This commit is contained in:
parent
da59c4a121
commit
eead279c58
|
@ -166,15 +166,15 @@ column_t operator/(column_t lhs, const column_t& rhs) { lhs /= rhs; return lhs;
|
||||||
|
|
||||||
column_t operator%(column_t lhs, const column_t& rhs) { lhs %= rhs; return lhs; }
|
column_t operator%(column_t lhs, const column_t& rhs) { lhs %= rhs; return lhs; }
|
||||||
|
|
||||||
column_t &column_t::operator+=(const column_t &rhs) { return *this = (*this + rhs); }
|
column_t &column_t::operator+=(const column_t &rhs) { index += rhs.index; return *this; }
|
||||||
|
|
||||||
column_t &column_t::operator-=(const column_t &rhs) { return *this = (*this - rhs); }
|
column_t &column_t::operator-=(const column_t &rhs) { index -= rhs.index; return *this; }
|
||||||
|
|
||||||
column_t &column_t::operator*=(const column_t &rhs) { return *this = (*this * rhs); }
|
column_t &column_t::operator*=(const column_t &rhs) { index *= rhs.index; return *this; }
|
||||||
|
|
||||||
column_t &column_t::operator/=(const column_t &rhs) { return *this = (*this / rhs); }
|
column_t &column_t::operator/=(const column_t &rhs) { index /= rhs.index; return *this; }
|
||||||
|
|
||||||
column_t &column_t::operator%=(const column_t &rhs) { return *this = (*this % rhs); }
|
column_t &column_t::operator%=(const column_t &rhs) { index %= rhs.index; return *this; }
|
||||||
|
|
||||||
bool operator>(const column_t::index_t &left, const column_t &right) { return column_t(left) > right; }
|
bool operator>(const column_t::index_t &left, const column_t &right) { return column_t(left) > right; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user