[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 e260d89 14/65: avoid operator double()
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 e260d89 14/65: avoid operator double() |
Date: |
Wed, 16 Sep 2020 16:55:13 -0400 (EDT) |
branch: valyuta/002
commit e260d89969cc9790c65f0430d3ab985537f1e440
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
avoid operator double()
---
currency.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/currency.hpp b/currency.hpp
index 8c6c51e..f6137d3 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -139,7 +139,7 @@ inline currency operator+(currency lhs, double rhs) {return
lhs += currency(rhs)
inline currency operator-(currency lhs, double rhs) {return lhs -=
currency(rhs);}
//inline currency operator*(currency lhs, double rhs) {return lhs *=
currency(rhs);}
////inline double operator*(currency lhs, double rhs) {return lhs *=
currency(rhs);}
-inline double operator*(currency lhs, double rhs) {return lhs.operator
double() * rhs;}
+inline double operator*(currency lhs, double rhs) {return lhs.operator*=(rhs);}
//inline currency operator*(currency lhs, int rhs) {return lhs *= rhs;}
//inline currency operator*(int lhs, currency rhs) {return rhs *= lhs;}
- [lmi-commits] [lmi] branch valyuta/002 created (now 9433c8e), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 ef7fe2f 01/65: Change type of currency variables to 'currency' in headers, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 540c4f3 11/65: currency(0.0), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 e260d89 14/65: avoid operator double(),
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 deba50c 25/65: assert rounding to currency makes sense, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 7dc9331 32/65: round.c(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 915d111 26/65: avoid operator double(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 d837132 38/65: Overload currency ctor, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 5d2e8ec 49/65: prefer to avoid operator=(double)?, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 015253b 10/65: add an alternative, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 346c95b 05/65: improve, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 c4e0809 24/65: use round_to<>.c(), Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 360060c 21/65: suppress failing assertions, Greg Chicares, 2020/09/16
- [lmi-commits] [lmi] valyuta/002 c407817 13/65: fix defect, Greg Chicares, 2020/09/16