mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixes detected by cppcheck (#4974)
* Janitor : Remove obsolete pointer to dialog * Janitor : Remove unused functions * Janitor : Remove unused functions * Janitor : Add explicit to constructors * Janitor : Remove unused variables * Janitor : Remove unused functions related to summary plot templates * clang-tidy : Use nullptr instead of 0 * clang-tidy : Fix usage of virtual and override * Upped to version 2019.08.2-dev.05 * Janitor : Remove unused variables * Janitor : Clean up several cppcheck issues * Janitor : Add cppcheck config files * Janitor : Use const when possible
This commit is contained in:
@@ -97,14 +97,14 @@ bool RigCellGeometryTools::estimateHexOverlapWithBoundingBox( const std::array<c
|
||||
|
||||
std::array<cvf::Vec3d, 8> overlapCorners = hexCorners;
|
||||
|
||||
std::vector<cvf::Vec3d> uniqueTopPoints = {hexCorners[0], hexCorners[1], hexCorners[2], hexCorners[3]};
|
||||
std::vector<cvf::Vec3d> uniqueTopPoints = { hexCorners[0], hexCorners[1], hexCorners[2], hexCorners[3] };
|
||||
uniqueTopPoints.erase( std::unique( uniqueTopPoints.begin(), uniqueTopPoints.end() ), uniqueTopPoints.end() );
|
||||
if ( uniqueTopPoints.size() < 3 ) return false;
|
||||
|
||||
cvf::Plane topPlane;
|
||||
if ( !topPlane.setFromPoints( uniqueTopPoints[0], uniqueTopPoints[1], uniqueTopPoints[2] ) ) return false;
|
||||
|
||||
std::vector<cvf::Vec3d> uniqueBottomPoints = {hexCorners[4], hexCorners[5], hexCorners[6], hexCorners[7]};
|
||||
std::vector<cvf::Vec3d> uniqueBottomPoints = { hexCorners[4], hexCorners[5], hexCorners[6], hexCorners[7] };
|
||||
uniqueBottomPoints.erase( std::unique( uniqueBottomPoints.begin(), uniqueBottomPoints.end() ),
|
||||
uniqueBottomPoints.end() );
|
||||
if ( uniqueBottomPoints.size() < 3 ) return false;
|
||||
@@ -256,7 +256,7 @@ void RigCellGeometryTools::simplifyPolygon( std::vector<cvf::Vec3d>* vertices, d
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<cvf::Vec3d> newVertices = {vertices->front(), vertices->back()};
|
||||
std::vector<cvf::Vec3d> newVertices = { vertices->front(), vertices->back() };
|
||||
*vertices = newVertices;
|
||||
}
|
||||
}
|
||||
@@ -508,7 +508,7 @@ std::vector<std::vector<cvf::Vec3d>>
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
/// Note for cppcheck : First four parameter cannot be const to match the signature of the receiver
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void fillInterpolatedSubjectZ( ClipperLib::IntPoint& e1bot,
|
||||
ClipperLib::IntPoint& e1top,
|
||||
@@ -654,7 +654,7 @@ std::pair<cvf::Vec3d, cvf::Vec3d> RigCellGeometryTools::getLineThroughBoundingBo
|
||||
}
|
||||
|
||||
std::pair<cvf::Vec3d, cvf::Vec3d> line;
|
||||
line = {startPoint, endPoint};
|
||||
line = { startPoint, endPoint };
|
||||
return line;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user