[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
;
- [lmi-commits] [lmi] branch valyuta/005 created (now 4401725), Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 fd74b61 03/17: Correct an obvious mistake, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 7d6e748 02/17: Improve currency class and unit tests, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 4902da4 01/17: Reinvent currency ab ovo, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 ffa2ce4 09/17: Redesign unit test, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 90d7483 10/17: Improve currency class, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 3d44f42 13/17: Save a sorted list of regressions, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 c8864d3 04/17: Add commented-out relops, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 f3219f8 12/17: Use CURRENCY_UNIT_IS_CENTS appropriately, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 aad51dd 07/17: Inline more,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/005 b852a68 05/17: Add features, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 d69f05c 06/17: Ratify some regression-testing differences, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 2aae91a 14/17: Improve incrementally, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 0735250 15/17: Improve incrementally, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 dfdbf3c 16/17: Use currency type for class members as appropriate, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 221c094 08/17: Prefer constexpr, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 4401725 17/17: Merge branch 'master' into valyuta/005, Greg Chicares, 2021/01/16
- [lmi-commits] [lmi] valyuta/005 e3f3eff 11/17: Revert "Ratify some regression-testing differences", Greg Chicares, 2021/01/16