lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/005 221c094 08/17: Prefer constexpr


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/005 221c094 08/17: Prefer constexpr
Date: Sat, 16 Jan 2021 21:06:17 -0500 (EST)

branch: valyuta/005
commit 221c0942f74d97a0330f0e00b4a94afa0cc2ef81
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Prefer constexpr
---
 currency.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/currency.hpp b/currency.hpp
index 502b0c3..996b761 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -125,8 +125,6 @@ inline double operator/(double lhs, currency const& rhs)
 }
 #endif // 0
 
-static inline currency const C0 {{}, raw_cents {}};
-
 inline std::ostream& operator<<(std::ostream& os, currency const& z)
 {
     os << z.d(); return os;
@@ -142,4 +140,6 @@ inline std::vector<double> doubleize(std::vector<currency> 
const& z)
         }
     return r;
 }
+
+inline constexpr currency C0 = {};
 #endif // currency_hpp



reply via email to

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