lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/001 c2a1b31 4/4: Internally represent curren


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/001 c2a1b31 4/4: Internally represent currency as integer rather than double
Date: Sat, 22 Aug 2020 11:37:10 -0400 (EDT)

branch: valyuta/001
commit c2a1b310bf9ff1c41454d52e1db99db1950dd961
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Internally represent currency as integer rather than double
    
    Do read 'README.branch'.
---
 currency.hpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/currency.hpp b/currency.hpp
index ff738b0..07ae2d0 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -44,12 +44,12 @@ using currency = double;
 #if defined USE_CURRENCY_CLASS
 class currency
 {
-#if defined __GNUC__
-#   pragma GCC diagnostic ignored "-Wuseless-cast"
-#endif // defined __GNUC__
-    using data_type = double;
+//#if defined __GNUC__
+//#   pragma GCC diagnostic ignored "-Wuseless-cast"
+//#endif // defined __GNUC__
+//  using data_type = double;
 //  using data_type = long double;
-//  using data_type = std::int64_t;
+    using data_type = std::int64_t;
 
     friend std::ostream& operator<<(std::ostream&, currency const&);
     friend class currency_test;



reply via email to

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