Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

ApproxMacher uses Approx's overloads for double directly

This saves a tiny little bit of compilation times when the
`ApproxMatcher` is used and `epsilon`, `margin`, or `scale` are
used to customize its behaviour.
Commit
05d7014e7511228d5a29452b4b6468a4b4a2d680
Author
Martin Hořeňovský ·
Parents
aa28a917cbf2

Files · Download .tar.gz

Changes

 src/catch2/matchers/catch_matchers_vector.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index e16a350a..5b1d8b98 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -116,17 +116,17 @@ namespace Matchers {
         }
         template <typename = std::enable_if_t<std::is_constructible<double, T>::value>>
         ApproxMatcher& epsilon( T const& newEpsilon ) {
-            approx.epsilon(newEpsilon);
+            approx.epsilon(static_cast<double>(newEpsilon));
             return *this;
         }
         template <typename = std::enable_if_t<std::is_constructible<double, T>::value>>
         ApproxMatcher& margin( T const& newMargin ) {
-            approx.margin(newMargin);
+            approx.margin(static_cast<double>(newMargin));
             return *this;
         }
         template <typename = std::enable_if_t<std::is_constructible<double, T>::value>>
         ApproxMatcher& scale( T const& newScale ) {
-            approx.scale(newScale);
+            approx.scale(static_cast<double>(newScale));
             return *this;
         }