Changed "const X ref"s to "X const ref"s

- Brought older code up to current convention (with the help of a Python script)
This commit is contained in:
Phil Nash 2013-04-23 18:58:56 +01:00
parent d0d4d93a6b
commit 2a9d8d9e36
44 changed files with 297 additions and 297 deletions

View file

@ -24,7 +24,7 @@ namespace Detail {
m_value( value )
{}
Approx( const Approx& other )
Approx( Approx const& other )
: m_epsilon( other.m_epsilon ),
m_scale( other.m_scale ),
m_value( other.m_value )
@ -41,20 +41,20 @@ namespace Detail {
return approx;
}
friend bool operator == ( double lhs, const Approx& rhs ) {
friend bool operator == ( double lhs, Approx const& rhs ) {
// Thanks to Richard Harris for his help refining this formula
return fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
}
friend bool operator == ( const Approx& lhs, double rhs ) {
friend bool operator == ( Approx const& lhs, double rhs ) {
return operator==( rhs, lhs );
}
friend bool operator != ( double lhs, const Approx& rhs ) {
friend bool operator != ( double lhs, Approx const& rhs ) {
return !operator==( lhs, rhs );
}
friend bool operator != ( const Approx& lhs, double rhs ) {
friend bool operator != ( Approx const& lhs, double rhs ) {
return !operator==( rhs, lhs );
}
@ -82,7 +82,7 @@ namespace Detail {
}
template<>
inline std::string toString<Detail::Approx>( const Detail::Approx& value ) {
inline std::string toString<Detail::Approx>( Detail::Approx const& value ) {
return value.toString();
}