[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 02d03f2 08/21: Discard more commented-ou
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 02d03f2 08/21: Discard more commented-out code |
Date: |
Fri, 18 Sep 2020 21:53:47 -0400 (EDT) |
branch: valyuta/002
commit 02d03f28ca51043373527eb05ad58f78908b7295
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Discard more commented-out code
In particular, there seems to be no need for operator double().
---
currency.hpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/currency.hpp b/currency.hpp
index b50c11a..40a7808 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -87,7 +87,6 @@ class currency
// currency& operator=(double d) {m_ = from_double(d); return
*this;}
// currency& operator=(int i) {m_ = cents_per_dollar *
bourn_cast<data_type>(i); return *this;}
-// operator double() const {return to_double();}
double d() const {return to_double();}
// Is this the ideal signature for this operator?
@@ -213,7 +212,6 @@ inline double operator/(double lhs, currency rhs) {return
lhs / rhs.d();}
inline std::ostream& operator<<(std::ostream& os, currency const& c)
{
-// return os << c.m_ << ' ' << c.to_double();
return os << c.to_double();
}
@@ -222,8 +220,6 @@ inline std::vector<double> doubleize(std::vector<currency>
const& z)
std::vector<double> r;
r.reserve(z.size());
for(auto const& i : z)
-// r.push_back(i.operator double()); // no need to convert explicitly
-// but that relies on a public operator double(), which is better avoided
r.push_back(i.d());
return r;
}
- [lmi-commits] [lmi] valyuta/002 24abb3f 03/21: Revert "Make it more faster", (continued)
- [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
- [lmi-commits] [lmi] valyuta/002 d8e2470 15/21: Refactor for clarity, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 b07371e 17/21: Avoid implicit conversions yet more avidly, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 331e748 18/21: Unbreak a unit test, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 02d03f2 08/21: Discard more commented-out code,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 3266cfe 11/21: Establish a separate test/ directory for this branch, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 0e9baa5 16/21: Use currency where currency is wanted, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 97e9057 21/21: Fix a unit test, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 8785c00 19/21: Implement negation operator, Greg Chicares, 2020/09/18
- [lmi-commits] [lmi] valyuta/002 97eb31d 20/21: Use negation operator, Greg Chicares, 2020/09/18