Add readability-simplify-boolean-expr

* Add readability-simplify-boolean-expr
* Fixes based on review
This commit is contained in:
Magne Sjaastad
2023-06-26 13:12:41 +02:00
committed by GitHub
parent 34d83efaed
commit 59ca0b943c
116 changed files with 179 additions and 635 deletions

View File

@@ -98,15 +98,8 @@ std::array<cvf::Vec3d, 4> RigCell::faceCorners( cvf::StructGridInterface::FaceTy
//--------------------------------------------------------------------------------------------------
bool isNear( const cvf::Vec3d& p1, const cvf::Vec3d& p2, double tolerance )
{
if ( cvf::Math::abs( p1[0] - p2[0] ) < tolerance && cvf::Math::abs( p1[1] - p2[1] ) < tolerance &&
cvf::Math::abs( p1[2] - p2[2] ) < tolerance )
{
return true;
}
else
{
return false;
}
return cvf::Math::abs( p1[0] - p2[0] ) < tolerance && cvf::Math::abs( p1[1] - p2[1] ) < tolerance &&
cvf::Math::abs( p1[2] - p2[2] ) < tolerance;
}
//--------------------------------------------------------------------------------------------------