Update to clang-16

Use runner Ubuntu 22.04 for clang-16
Remove unused code detected by clang-16
This commit is contained in:
Magne Sjaastad
2024-01-05 15:13:50 +01:00
committed by GitHub
parent 9ac518fbe0
commit ff6472c6b7
8 changed files with 30 additions and 32 deletions

View File

@@ -272,8 +272,7 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1, double azi1,
SolveStatus solveResultStatus = NOT_SOLVED;
int backstepLevel = 0;
int iteration = 1;
int iteration = 1;
for ( iteration = 1; iteration < maxIterations; ++iteration )
{
if ( fabs( q1Step ) > maxStepSize || fabs( q2Step ) > maxStepSize )
@@ -349,18 +348,12 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1, double azi1,
// if (isZeroCrossingR2)
q2Step = 0.9 * q2Step * fabs( R2_error ) / ( fabs( R2_error_new ) + fabs( R2_error ) );
++backstepLevel;
#ifdef DEBUG_OUTPUT_ON
std::cout << " Backstep needed. " << std::endl;
#endif
continue;
}
else
{
backstepLevel = 0;
}
}
#ifdef DEBUG_OUTPUT_ON

View File

@@ -478,7 +478,6 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
cvf::Vec2d primaryAxisVector = pairs[0].first * axesVectorCandidates[pairs[0].first];
size_t row = 0;
size_t column = 0;
std::vector<std::vector<unsigned>> indexToPointData;
std::vector<unsigned> startOffsets;
@@ -512,7 +511,6 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
{
indexToPointData.push_back( std::vector<unsigned>() );
}
row = 0;
int offset = distanceOnLine( lineStartPoint, lineEndPoint, to2d( surfacePoints[index] ) );
if ( offset < 0 )
{
@@ -524,7 +522,6 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
for ( int i = 0; i < offset; i++ )
{
indexToPointData[column].push_back( -1 );
row++;
}
startOffsets.push_back( 0 );
}
@@ -537,7 +534,6 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
for ( size_t i = 1; i < rowDiff; i++ )
{
indexToPointData[column].push_back( -1 );
row++;
}
}
int offset = distanceOnLine( lineStartPoint, lineEndPoint, to2d( surfacePoints[index] ) );
@@ -555,7 +551,6 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
indexToPointData.push_back( std::vector<unsigned>() );
}
indexToPointData[column].push_back( static_cast<unsigned>( index ) );
row++;
}
for ( size_t i = 0; i < startOffsets.size(); i++ )

View File

@@ -164,7 +164,6 @@ RimPolylinesFromFileAnnotation* RimAnnotationCollection::importOrUpdatePolylines
}
}
size_t newLinesIdx = 0;
for ( const QString& newFileName : newFileNames )
{
RimPolylinesFromFileAnnotation* newPolyLinesAnnot = new RimPolylinesFromFileAnnotation;
@@ -177,8 +176,6 @@ RimPolylinesFromFileAnnotation* RimAnnotationCollection::importOrUpdatePolylines
m_polylineFromFileAnnotations->addAnnotation( newPolyLinesAnnot );
polyLinesObjsToReload.push_back( newPolyLinesAnnot );
++newLinesIdx;
}
updateViewAnnotationCollections();

View File

@@ -377,7 +377,6 @@ void RimWellLogTrack::calculatePropertyValueZoomRange()
double maxValue = -HUGE_VAL;
size_t topologyCurveCount = 0;
size_t visibleCurves = 0u;
for ( const auto& curve : m_curves )
{
double minCurveValue = HUGE_VAL;
@@ -385,7 +384,6 @@ void RimWellLogTrack::calculatePropertyValueZoomRange()
if ( curve->isChecked() )
{
visibleCurves++;
if ( curve->propertyValueRangeInData( &minCurveValue, &maxCurveValue ) )
{
if ( minCurveValue < minValue )

View File

@@ -1765,7 +1765,6 @@ void RiuMainWindow::updateMemoryUsage()
QColor okColor( 0, 150, 0 );
QColor warningColor( 200, 0, 0 );
QColor criticalColor( 255, 100, 0 );
float currentUsageFraction = 0.0f;
float availVirtualFraction = 1.0f;