From 05d7014e7511228d5a29452b4b6468a4b4a2d680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 11 Aug 2020 19:07:14 +0200 Subject: [PATCH] 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. --- 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 ::value>> ApproxMatcher& epsilon( T const& newEpsilon ) { - approx.epsilon(newEpsilon); + approx.epsilon(static_cast(newEpsilon)); return *this; } template ::value>> ApproxMatcher& margin( T const& newMargin ) { - approx.margin(newMargin); + approx.margin(static_cast(newMargin)); return *this; } template ::value>> ApproxMatcher& scale( T const& newScale ) { - approx.scale(newScale); + approx.scale(static_cast(newScale)); return *this; }