mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Fix warnings generated with -Wshadow
This commit is contained in:
parent
c3c82f539c
commit
d6fce7bf34
@ -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)));
|
return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Approx::setMargin(double margin) {
|
void Approx::setMargin(double newMargin) {
|
||||||
CATCH_ENFORCE(margin >= 0,
|
CATCH_ENFORCE(newMargin >= 0,
|
||||||
"Invalid Approx::margin: " << margin << '.'
|
"Invalid Approx::margin: " << newMargin << '.'
|
||||||
<< " Approx::Margin has to be non-negative.");
|
<< " Approx::Margin has to be non-negative.");
|
||||||
m_margin = margin;
|
m_margin = newMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Approx::setEpsilon(double epsilon) {
|
void Approx::setEpsilon(double newEpsilon) {
|
||||||
CATCH_ENFORCE(epsilon >= 0 && epsilon <= 1.0,
|
CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,
|
||||||
"Invalid Approx::epsilon: " << epsilon << '.'
|
"Invalid Approx::epsilon: " << newEpsilon << '.'
|
||||||
<< " Approx::epsilon has to be in [0, 1]");
|
<< " Approx::epsilon has to be in [0, 1]");
|
||||||
m_epsilon = epsilon;
|
m_epsilon = newEpsilon;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace Detail
|
} // end namespace Detail
|
||||||
|
@ -227,9 +227,9 @@ TEST_CASE( "CAPTURE can deal with complex expressions", "[messages][capture]" )
|
|||||||
|
|
||||||
template <typename T1, typename T2>
|
template <typename T1, typename T2>
|
||||||
struct helper_1436 {
|
struct helper_1436 {
|
||||||
helper_1436(T1 t1, T2 t2):
|
helper_1436(T1 t1_, T2 t2_):
|
||||||
t1{ t1 },
|
t1{ t1_ },
|
||||||
t2{ t2 }
|
t2{ t2_ }
|
||||||
{}
|
{}
|
||||||
T1 t1;
|
T1 t1;
|
||||||
T2 t2;
|
T2 t2;
|
||||||
|
Loading…
Reference in New Issue
Block a user