Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-11 19:07:14 +0200
committerMartin Hořeňovský2020-08-11 19:07:37 +0200
commit05d7014e7511228d5a29452b4b6468a4b4a2d680 (patch)
tree56532657db47acb4d972db15b96e35a3b08751d6 /src
parentaa28a917cbf2fe77b1c611b606dc8b1f39581142 (diff)
downloadcatch3-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')
-rw-r--r--src/catch2/matchers/catch_matchers_vector.hpp6
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;
}