diff options
| author | Martin Hořeňovský | 2020-08-11 19:07:14 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-08-11 19:07:37 +0200 |
| commit | 05d7014e7511228d5a29452b4b6468a4b4a2d680 (patch) | |
| tree | 56532657db47acb4d972db15b96e35a3b08751d6 /src/catch2 | |
| parent | aa28a917cbf2fe77b1c611b606dc8b1f39581142 (diff) | |
| download | catch3-05d7014e7511228d5a29452b4b6468a4b4a2d680.tar.gz | |
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.
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/matchers/catch_matchers_vector.hpp | 6 |
1 files 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; } |