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

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorStephen Newell2019-01-13 08:54:23 -0700
committerMartin Hořeňovský2019-04-18 15:30:38 +0200
commitd6fce7bf34cfeb34cdb6c3a69bb454aee98a4547 (patch)
tree8786a0f1700305a2a7c5a3e3e30bdb50c84356ac /include
parentc3c82f539c1d31df6b7f828efe4f4ba9eb650bf7 (diff)
downloadcatch3-d6fce7bf34cfeb34cdb6c3a69bb454aee98a4547.tar.gz
Fix warnings generated with -Wshadow
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_approx.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/internal/catch_approx.cpp b/include/internal/catch_approx.cpp
index a7d7111c..da7e4020 100644
--- a/include/internal/catch_approx.cpp
+++ b/include/internal/catch_approx.cpp
@@ -55,18 +55,18 @@ namespace Detail {
return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value)));
}
- void Approx::setMargin(double margin) {
- CATCH_ENFORCE(margin >= 0,
- "Invalid Approx::margin: " << margin << '.'
+ void Approx::setMargin(double newMargin) {
+ CATCH_ENFORCE(newMargin >= 0,
+ "Invalid Approx::margin: " << newMargin << '.'
<< " Approx::Margin has to be non-negative.");
- m_margin = margin;
+ m_margin = newMargin;
}
- void Approx::setEpsilon(double epsilon) {
- CATCH_ENFORCE(epsilon >= 0 && epsilon <= 1.0,
- "Invalid Approx::epsilon: " << epsilon << '.'
+ void Approx::setEpsilon(double newEpsilon) {
+ CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,
+ "Invalid Approx::epsilon: " << newEpsilon << '.'
<< " Approx::epsilon has to be in [0, 1]");
- m_epsilon = epsilon;
+ m_epsilon = newEpsilon;
}
} // end namespace Detail