[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 4b313b0 07/21: Discard some commented-ou
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 4b313b0 07/21: Discard some commented-out code |
Date: |
Fri, 18 Sep 2020 21:53:47 -0400 (EDT) |
branch: valyuta/002
commit 4b313b0e96cc841e352687bf3977bde42489b13f
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Discard some commented-out code
Write relational operators out of line, rather than as members: this
should generate the same code, and makes the class definition smaller.
Maybe C++20's operator<=> will replace this anyway, someday.
---
currency.hpp | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/currency.hpp b/currency.hpp
index dc4604c..b50c11a 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -90,25 +90,6 @@ class currency
// operator double() const {return to_double();}
double d() const {return to_double();}
-#if 0
- // Is this better, with 'const&'?
-// bool operator==(currency const& z) const {return z.m_ == m_;}
-
- bool operator< (currency z) const {return m_ < z.m_;}
- bool operator<=(currency z) const {return m_ <= z.m_;}
- bool operator==(currency z) const {return m_ == z.m_;}
- bool operator!=(currency z) const {return m_ != z.m_;}
- bool operator> (currency z) const {return m_ > z.m_;}
- bool operator>=(currency z) const {return m_ >= z.m_;}
-
- bool operator< (double d) const {return to_double() < d;}
- bool operator<=(double d) const {return to_double() <= d;}
- bool operator==(double d) const {return to_double() == d;}
- bool operator!=(double d) const {return to_double() != d;}
- bool operator> (double d) const {return to_double() > d;}
- bool operator>=(double d) const {return to_double() >= d;}
-#endif // 0
-
// Is this the ideal signature for this operator?
// currency operator-() const {return currency(-m_);}
// currency& operator-() {m_ = -m_; return *this;}
- [lmi-commits] [lmi] valyuta/002 updated (3f71218 -> 97e9057), Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 da89fe3 04/21: Revert "Make it faster", Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 4b313b0 07/21: Discard some commented-out code,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 e474aa4 09/21: Remove int relops, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 d1c1af3 01/21: Revert "Trivially avoid spurious regression errors", Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 693dac0 02/21: Revert "Make it even faster", Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 24abb3f 03/21: Revert "Make it more faster", Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 95f34c4 06/21: Get rid of unneeded scalar doubleize(), Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 9dc1602 10/21: Remove double relops, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 b803441 12/21: Improve documentation, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 06046b6 05/21: Revert "Make it float", Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 215244a 13/21: Avoid implicit mixed-mode calculations more avidly, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 63419d4 14/21: Improve documentation, Greg Chicares, 2020/09/18