lmi-commits
[Top][All Lists]
Advanced

[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;}
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]