mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
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.
This commit is contained in:
parent
aa28a917cb
commit
05d7014e75
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user