mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update clang-tidy.yml
* Make sure clang-tidy action use .clang-tidy config file Use add-paths to instruct create-pull-request to a sub folder to avoid diff from Qt and vcpkg * Use empty() in macro to avoid clang-tidy warning * Add NOLINT to CAF_ASSERT * Add NOLINT to cvfAssert
This commit is contained in:
@@ -57,14 +57,7 @@ RivBoxIntersectionGeometryGenerator::~RivBoxIntersectionGeometryGenerator()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivBoxIntersectionGeometryGenerator::isAnyGeometryPresent() const
|
||||
{
|
||||
if ( m_triangleVxes->size() == 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return m_triangleVxes->size() != 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -89,7 +82,7 @@ cvf::ref<cvf::DrawableGeo> RivBoxIntersectionGeometryGenerator::generateSurface(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivBoxIntersectionGeometryGenerator::createMeshDrawable()
|
||||
{
|
||||
if ( !( m_cellBorderLineVxes.notNull() && m_cellBorderLineVxes->size() != 0 ) ) return nullptr;
|
||||
if ( !m_cellBorderLineVxes.notNull() || m_cellBorderLineVxes->size() == 0 ) return nullptr;
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
||||
geo->setVertexArray( m_cellBorderLineVxes.p() );
|
||||
|
||||
@@ -68,7 +68,7 @@ bool RivEclipseIntersectionGrid::useCell( size_t cellIndex ) const
|
||||
{
|
||||
const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex];
|
||||
if ( m_showInactiveCells )
|
||||
return !( cell.isInvalid() || ( cell.subGrid() != nullptr ) );
|
||||
return !cell.isInvalid() && ( cell.subGrid() == nullptr );
|
||||
else
|
||||
return m_activeCellInfo->isActive( cellIndex ) && ( cell.subGrid() == nullptr );
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::genera
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createMeshDrawable()
|
||||
{
|
||||
if ( !( m_cellBorderLineVxes.notNull() && m_cellBorderLineVxes->size() != 0 ) ) return nullptr;
|
||||
if ( !m_cellBorderLineVxes.notNull() || m_cellBorderLineVxes->size() == 0 ) return nullptr;
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
||||
geo->setVertexArray( m_cellBorderLineVxes.p() );
|
||||
@@ -654,7 +654,7 @@ cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::create
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createFaultMeshDrawable()
|
||||
{
|
||||
if ( !( m_faultCellBorderLineVxes.notNull() && m_faultCellBorderLineVxes->size() != 0 ) ) return nullptr;
|
||||
if ( !m_faultCellBorderLineVxes.notNull() || m_faultCellBorderLineVxes->size() == 0 ) return nullptr;
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
||||
geo->setVertexArray( m_faultCellBorderLineVxes.p() );
|
||||
@@ -841,12 +841,7 @@ cvf::Mat4d RivExtrudedCurveIntersectionGeometryGenerator::unflattenTransformMatr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivExtrudedCurveIntersectionGeometryGenerator::isAnyGeometryPresent() const
|
||||
{
|
||||
if ( m_triangleVxes->size() == 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return m_triangleVxes->size() != 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -110,7 +110,7 @@ void RivFemIntersectionGrid::cellCornerIndices( size_t globalCellIndex, size_t c
|
||||
auto [part, elementIdx] = m_femParts->partAndElementIndex( globalCellIndex );
|
||||
|
||||
RigElementType elmType = part->elementType( elementIdx );
|
||||
if ( !( elmType == HEX8 || elmType == HEX8P ) ) return;
|
||||
if ( elmType != HEX8 && elmType != HEX8P ) return;
|
||||
|
||||
int elmIdx = static_cast<int>( elementIdx );
|
||||
const int partId = part->elementPartId();
|
||||
|
||||
Reference in New Issue
Block a user