lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/005 aad51dd 07/17: Inline more


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/005 aad51dd 07/17: Inline more
Date: Sat, 16 Jan 2021 21:06:17 -0500 (EST)

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

    Inline more
---
 round_to.hpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/round_to.hpp b/round_to.hpp
index 00c7389..ddb0bef 100644
--- a/round_to.hpp
+++ b/round_to.hpp
@@ -382,7 +382,7 @@ inline std::vector<RealType> 
round_to<RealType>::operator()(std::vector<RealType
 }
 
 template<typename RealType>
-currency round_to<RealType>::c(RealType r) const
+inline currency round_to<RealType>::c(RealType r) const
 {
     RealType const z = static_cast<RealType>
         (rounding_function_(static_cast<RealType>(r * scale_fwd_)) * 
scale_back_cents_
@@ -392,7 +392,7 @@ currency round_to<RealType>::c(RealType r) const
 }
 
 template<typename RealType>
-std::vector<currency> round_to<RealType>::c(std::vector<RealType> r) const
+inline std::vector<currency> round_to<RealType>::c(std::vector<RealType> r) 
const
 {
     std::vector<currency> z;
     z.reserve(r.size());
@@ -402,10 +402,10 @@ std::vector<currency> 
round_to<RealType>::c(std::vector<RealType> r) const
 
 // !! need unit tests
 template<typename RealType>
-currency round_to<RealType>::c(currency z) const
+inline currency round_to<RealType>::c(currency z) const
 {
     return
-        (decimals() < currency::cents_digits)
+        (decimals_ < currency::cents_digits)
         ? c(z.d())
         : z
         ;



reply via email to

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