lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] valyuta/002 49f84a1 60/65: Don't convert type with o


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/002 49f84a1 60/65: Don't convert type with operator=()
Date: Wed, 16 Sep 2020 16:55:22 -0400 (EDT)

branch: valyuta/002
commit 49f84a1e808c7ca026a6d3f320dae3956efee1b9
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Don't convert type with operator=()
---
 basicvalues.cpp | 6 +++---
 currency.hpp    | 2 +-
 ihs_acctval.cpp | 2 +-
 ihs_avmly.cpp   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/basicvalues.cpp b/basicvalues.cpp
index 7c593c3..056e677 100644
--- a/basicvalues.cpp
+++ b/basicvalues.cpp
@@ -123,9 +123,9 @@ void BasicValues::Init()
 //  database().query_into(DB_MinWd     , MinWD     );
 //  database().query_into(DB_WdFee     , WDFee     );
 //  database().query_into(DB_WdFeeRate , WDFeeRate );
-    MinSpecAmt = database().query<int>(DB_MinSpecAmt);
-    MinWD      = database().query<int>(DB_MinWd     );
-    WDFee      = database().query<int>(DB_WdFee     );
+    MinSpecAmt = currency(database().query<int>(DB_MinSpecAmt));
+    MinWD      = currency(database().query<int>(DB_MinWd     ));
+    WDFee      = currency(database().query<int>(DB_WdFee     ));
 //  WDFeeRate  = database().query<int>(DB_WdFeeRate ); // no, this line looks 
wrong
     database().query_into(DB_WdFeeRate , WDFeeRate );
 
diff --git a/currency.hpp b/currency.hpp
index 133aa16..fc0d61e 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -71,7 +71,7 @@ class currency
     // IMPORTANT eventually suppress this? or both of these?
     // defining both causes real problems
 //  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;}
+//  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();}
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 1d4f744..663a371 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -611,7 +611,7 @@ void AccountValue::SetInitialValues()
     DcvWpCharge                 = 0.0;
 
     HoneymoonActive             = false;
-    HoneymoonValue              = -std::numeric_limits<int>::max(); // yick
+    HoneymoonValue              = currency(-std::numeric_limits<int>::max()); 
// yick
     if(mce_gen_curr == GenBasis_)
         {
         HoneymoonActive = yare_input_.HoneymoonEndorsement;
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index c00d3cd..f2367ce 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -2057,7 +2057,7 @@ void AccountValue::TxTestHoneymoonForExpiration()
     if(HoneymoonValue <= currency() || HoneymoonValue < csv_ignoring_loan)
         {
         HoneymoonActive = false;
-        HoneymoonValue  = -std::numeric_limits<int>::max(); // yick
+        HoneymoonValue  = currency(-std::numeric_limits<int>::max()); // yick
         }
 }
 



reply via email to

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