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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorCertseeds2022-02-02 12:11:52 +0800
committerMartin Hořeňovský2022-02-04 00:09:01 +0100
commit9afb6ce13898e2e11e62d06ccbcea1d81caab610 (patch)
tree065d68cbf0faa4dcbacc0ff9082a921506a0decc /src/catch2
parentefb54926eec28900e020131930b35116075f6f84 (diff)
downloadcatch3-9afb6ce13898e2e11e62d06ccbcea1d81caab610.tar.gz
feature: double -> const auto when static_cast in right
</subject> Branch: devel <type>: - [ ] Bug fix - [ ] Bug fix (Test) - [x] New feature - [ ] Breaking change - [ ] Documentation update - [ ] This change requires a documentation update <body> <footer> Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/catch_approx.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/catch_approx.hpp b/src/catch2/catch_approx.hpp
index 7c3a17c0..a46caeb5 100644
--- a/src/catch2/catch_approx.hpp
+++ b/src/catch2/catch_approx.hpp
@@ -86,14 +86,14 @@ namespace Catch {
template <typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx& epsilon( T const& newEpsilon ) {
- double epsilonAsDouble = static_cast<double>(newEpsilon);
+ const auto epsilonAsDouble = static_cast<double>(newEpsilon);
setEpsilon(epsilonAsDouble);
return *this;
}
template <typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx& margin( T const& newMargin ) {
- double marginAsDouble = static_cast<double>(newMargin);
+ const auto marginAsDouble = static_cast<double>(newMargin);
setMargin(marginAsDouble);
return *this;
}