mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
CppCheck : Remove unused variables
This commit is contained in:
parent
f9a402b0f9
commit
53c39cdc73
@ -68,10 +68,6 @@ void RicNewAnalysisPlotFeature::onActionTriggered( bool isChecked )
|
||||
selObj->firstAncestorOrThisOfType( analysisPlotColl );
|
||||
}
|
||||
|
||||
RimSummaryCaseCollection* ensemble = nullptr;
|
||||
QString quantityName;
|
||||
std::time_t timeStep = 0;
|
||||
|
||||
RimAnalysisPlot* newPlot = nullptr;
|
||||
if ( !analysisPlotColl )
|
||||
{
|
||||
@ -83,10 +79,10 @@ void RicNewAnalysisPlotFeature::onActionTriggered( bool isChecked )
|
||||
CAF_ASSERT( !correlationPlotCollections.empty() );
|
||||
analysisPlotColl = correlationPlotCollections.front();
|
||||
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
ensemble = params.ensemble;
|
||||
quantityName = params.mainQuantityName;
|
||||
timeStep = params.timeStep;
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
RimSummaryCaseCollection* ensemble = params.ensemble;
|
||||
QString quantityName = params.mainQuantityName;
|
||||
std::time_t timeStep = params.timeStep;
|
||||
|
||||
newPlot = analysisPlotColl->createAnalysisPlot( ensemble, quantityName, timeStep );
|
||||
}
|
||||
|
@ -69,10 +69,6 @@ void RicNewCorrelationMatrixPlotFeature::onActionTriggered( bool isChecked )
|
||||
selObj->firstAncestorOrThisOfType( correlationPlotColl );
|
||||
}
|
||||
|
||||
RimSummaryCaseCollection* ensemble = nullptr;
|
||||
std::vector<QString> includedQuantityNames;
|
||||
std::time_t timeStep = 0;
|
||||
|
||||
RimCorrelationMatrixPlot* newPlot = nullptr;
|
||||
if ( !correlationPlotColl )
|
||||
{
|
||||
@ -86,10 +82,10 @@ void RicNewCorrelationMatrixPlotFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
|
||||
includedQuantityNames =
|
||||
std::vector<QString> includedQuantityNames =
|
||||
std::vector<QString>( params.includedQuantityNames.begin(), params.includedQuantityNames.end() );
|
||||
ensemble = params.ensemble;
|
||||
timeStep = params.timeStep;
|
||||
RimSummaryCaseCollection* ensemble = params.ensemble;
|
||||
std::time_t timeStep = params.timeStep;
|
||||
|
||||
newPlot = correlationPlotColl->createCorrelationMatrixPlot( ensemble, includedQuantityNames, timeStep );
|
||||
}
|
||||
|
@ -66,10 +66,6 @@ void RicNewCorrelationPlotFeature::onActionTriggered( bool isChecked )
|
||||
selObj->firstAncestorOrThisOfType( correlationPlotColl );
|
||||
}
|
||||
|
||||
RimSummaryCaseCollection* ensemble = nullptr;
|
||||
QString quantityName;
|
||||
std::time_t timeStep = 0;
|
||||
|
||||
RimCorrelationPlot* newPlot = nullptr;
|
||||
if ( !correlationPlotColl )
|
||||
{
|
||||
@ -81,10 +77,10 @@ void RicNewCorrelationPlotFeature::onActionTriggered( bool isChecked )
|
||||
CAF_ASSERT( !correlationPlotCollections.empty() );
|
||||
correlationPlotColl = correlationPlotCollections.front();
|
||||
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
ensemble = params.ensemble;
|
||||
quantityName = params.mainQuantityName;
|
||||
timeStep = params.timeStep;
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
RimSummaryCaseCollection* ensemble = params.ensemble;
|
||||
QString quantityName = params.mainQuantityName;
|
||||
std::time_t timeStep = params.timeStep;
|
||||
|
||||
newPlot = correlationPlotColl->createCorrelationPlot( ensemble, quantityName, timeStep );
|
||||
}
|
||||
|
@ -67,11 +67,6 @@ void RicNewCorrelationReportPlotFeature::onActionTriggered( bool isChecked )
|
||||
selObj->firstAncestorOrThisOfType( correlationPlotColl );
|
||||
}
|
||||
|
||||
RimSummaryCaseCollection* ensemble = nullptr;
|
||||
std::vector<QString> includedQuantityNames;
|
||||
QString mainQuantityName;
|
||||
std::time_t timeStep = 0;
|
||||
|
||||
RimCorrelationReportPlot* newPlot = nullptr;
|
||||
if ( !correlationPlotColl )
|
||||
{
|
||||
@ -83,13 +78,13 @@ void RicNewCorrelationReportPlotFeature::onActionTriggered( bool isChecked )
|
||||
CAF_ASSERT( !correlationPlotCollections.empty() );
|
||||
correlationPlotColl = correlationPlotCollections.front();
|
||||
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
ensemble = params.ensemble;
|
||||
includedQuantityNames =
|
||||
EnsemblePlotParams params = userData.value<EnsemblePlotParams>();
|
||||
RimSummaryCaseCollection* ensemble = params.ensemble;
|
||||
std::vector<QString> includedQuantityNames =
|
||||
std::vector<QString>( params.includedQuantityNames.begin(), params.includedQuantityNames.end() );
|
||||
|
||||
mainQuantityName = params.mainQuantityName;
|
||||
timeStep = params.timeStep;
|
||||
QString mainQuantityName = params.mainQuantityName;
|
||||
std::time_t timeStep = params.timeStep;
|
||||
|
||||
newPlot = correlationPlotColl->createCorrelationReportPlot( ensemble,
|
||||
includedQuantityNames,
|
||||
|
@ -259,8 +259,6 @@ void RicGridStatisticsDialog::deletePlotItems( QwtPlot* plot )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicGridStatisticsDialog::setMarkers( const Rim3dOverlayInfoConfig::HistogramData& histData, QwtPlot* plot )
|
||||
{
|
||||
auto scale = plot->axisScaleDiv( QwtPlot::yLeft );
|
||||
|
||||
QwtPlotMarker* marker;
|
||||
|
||||
if ( histData.p10 != HUGE_VAL )
|
||||
|
@ -381,8 +381,6 @@ std::vector<std::string> RifHdf5Reader::getSubGroupNames( H5::H5File file, std::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RifHdf5Reader::getResultNames( H5::H5File file, std::string baseGroupName ) const
|
||||
{
|
||||
H5::Group baseGroup = file.openGroup( baseGroupName.c_str() );
|
||||
|
||||
std::vector<std::string> subGroupNames = getSubGroupNames( file, baseGroupName );
|
||||
|
||||
std::vector<std::string> resultNames;
|
||||
|
@ -183,8 +183,7 @@ void RifStimPlanXmlReader::readStimplanGridAndTimesteps( QXmlStreamReader&
|
||||
MirrorMode mirrorMode,
|
||||
RiaEclipseUnitTools::UnitSystem requiredUnit )
|
||||
{
|
||||
size_t startNegValuesYs = 0;
|
||||
QString gridunit = "unknown";
|
||||
size_t startNegValuesYs = 0;
|
||||
|
||||
xmlStream.readNext();
|
||||
|
||||
@ -209,7 +208,7 @@ void RifStimPlanXmlReader::readStimplanGridAndTimesteps( QXmlStreamReader&
|
||||
// Support for one grid per file
|
||||
if ( gridSectionCount < 1 )
|
||||
{
|
||||
gridunit = getAttributeValueString( xmlStream, "uom" );
|
||||
QString gridunit = getAttributeValueString( xmlStream, "uom" );
|
||||
|
||||
if ( gridunit == "m" )
|
||||
stimPlanFileData->m_unitSet = RiaEclipseUnitTools::UnitSystem::UNITS_METRIC;
|
||||
|
@ -35,12 +35,12 @@ bool RifSurfaceExporter::writeGocadTSurfFile( const QString& fil
|
||||
|
||||
QTextStream out( &exportFile );
|
||||
|
||||
QString headerForExport = headerText;
|
||||
if ( headerText.isEmpty() ) headerForExport = "surface";
|
||||
QString headerForExport = headerForExport = "surface";
|
||||
if ( !headerText.isEmpty() ) headerForExport = headerText;
|
||||
|
||||
out << "GOCAD TSurf 1 \n";
|
||||
out << "HEADER { \n";
|
||||
out << "name:" + headerText + " \n";
|
||||
out << "name:" + headerForExport + " \n";
|
||||
out << "} \n";
|
||||
out << "GOCAD_ORIGINAL_COORDINATE_SYSTEM \n";
|
||||
out << "NAME Default \n";
|
||||
|
@ -92,9 +92,8 @@ void RigFemPartGrid::generateStructGridData()
|
||||
|
||||
m_elementIJKCounts = cvf::Vec3st( 0, 0, 0 );
|
||||
|
||||
int elmIdxInK = elmIdxForIJK_000;
|
||||
cvf::Vec3f posKNormal = m_femPart->faceNormal( elmIdxInK, posKFaceIdx );
|
||||
int kCoord = 0;
|
||||
int elmIdxInK = elmIdxForIJK_000;
|
||||
int kCoord = 0;
|
||||
while ( true )
|
||||
{
|
||||
int elmIdxInJ = elmIdxInK;
|
||||
|
@ -78,8 +78,6 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorInitialPorosity::calculate(
|
||||
|
||||
frameCountProgress.setNextProgressIncrement( 1u );
|
||||
|
||||
int referenceFrameIdx = m_resultCollection->referenceTimeStep();
|
||||
|
||||
int frameCount = voidRatioFrames->frameCount();
|
||||
for ( int fIdx = 0; fIdx < frameCount; ++fIdx )
|
||||
{
|
||||
|
@ -893,8 +893,6 @@ void RimAnalysisPlot::updateAxes()
|
||||
m_plotWidget->enableAxis( qwtAxis, true );
|
||||
m_valueAxisProperties->setNameAndAxis( "Value-Axis", qwtAxis );
|
||||
|
||||
std::set<QString> timeHistoryQuantities;
|
||||
|
||||
RimSummaryPlotAxisFormatter calc( valAxisProperties, {}, curveDefinitions(), {}, {} );
|
||||
calc.applyAxisPropertiesToPlot( m_plotWidget );
|
||||
}
|
||||
@ -1097,12 +1095,8 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
|
||||
std::set<RimSummaryCase*>* filteredSumCases,
|
||||
std::set<RifEclipseSummaryAddress>* filteredSummaryItems )
|
||||
{
|
||||
const std::vector<RiaSummaryCurveDefinition> curveDefsToFilter;
|
||||
|
||||
if ( !filter->isActive() || !filter->isValid() ) return;
|
||||
|
||||
std::vector<RiaSummaryCurveDefinition> filteredCurveDefs;
|
||||
|
||||
std::set<RimSummaryCase*> casesToKeep;
|
||||
std::set<RifEclipseSummaryAddress> sumItemsToKeep;
|
||||
|
||||
@ -1117,7 +1111,6 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
|
||||
|
||||
EnsembleParameter eParam = this->ensembleParameter( filter->ensembleParameterName() );
|
||||
|
||||
std::set<RimSummaryCase*> casesToRemove;
|
||||
for ( auto sumCase : ( *filteredSumCases ) )
|
||||
{
|
||||
if ( !eParam.isValid() ) continue;
|
||||
|
@ -249,8 +249,6 @@ void RimCorrelationPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chart
|
||||
std::vector<std::pair<EnsembleParameter, double>> correlations =
|
||||
ensemble->parameterCorrelations( address, selectedTimestep, m_selectedParametersList() );
|
||||
|
||||
QString timestepString = m_timeStep().toString( RiaPreferences::current()->dateTimeFormat() );
|
||||
|
||||
for ( auto parameterCorrPair : correlations )
|
||||
{
|
||||
double value = m_showAbsoluteValues() ? std::abs( parameterCorrPair.second ) : parameterCorrPair.second;
|
||||
|
@ -66,9 +66,6 @@ void Rim2dIntersectionViewCollection::syncFromExistingIntersections( bool doUpda
|
||||
std::vector<RimExtrudedCurveIntersection*> allOrderedIntersectionsInCase;
|
||||
parentCase->descendantsIncludingThisOfType( allOrderedIntersectionsInCase );
|
||||
|
||||
std::set<RimExtrudedCurveIntersection*> currentIntersections( allOrderedIntersectionsInCase.begin(),
|
||||
allOrderedIntersectionsInCase.end() );
|
||||
|
||||
// Delete views without a valid intersection
|
||||
|
||||
for ( Rim2dIntersectionView* iv : m_intersectionViews )
|
||||
|
@ -163,7 +163,6 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
|
||||
std::vector<double> formationValues = curveData.data;
|
||||
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( eclipseCase );
|
||||
|
||||
RimFractureModelTemplate* fractureModelTemplate = m_fractureModel->fractureModelTemplate();
|
||||
|
@ -76,8 +76,6 @@ void RimGeoMechModels::removeCase( RimGeoMechCase* thecase )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechCase* RimGeoMechModels::copyCase( RimGeoMechCase* thecase, const QString& newInputFileName )
|
||||
{
|
||||
std::vector<RimGeoMechCase*> newcases;
|
||||
|
||||
for ( auto gmcase : m_cases() )
|
||||
{
|
||||
if ( gmcase->gridFileName() == newInputFileName )
|
||||
|
@ -118,8 +118,6 @@ void RimSummaryPlotAxisFormatter::applyAxisPropertiesToPlot( RiuQwtPlotWidget* q
|
||||
QString axisTitle = m_axisProperties->customTitle;
|
||||
if ( m_axisProperties->useAutoTitle() ) axisTitle = autoAxisTitle();
|
||||
|
||||
QwtText axisTitleY = qwtPlot->axisTitle( m_axisProperties->qwtPlotAxisType() );
|
||||
|
||||
Qt::AlignmentFlag titleAlignment = Qt::AlignCenter;
|
||||
if ( m_axisProperties->titlePosition() == RimPlotAxisPropertiesInterface::AXIS_TITLE_END )
|
||||
{
|
||||
|
@ -49,8 +49,6 @@ RimSummaryCase_summaryVectorValues::RimSummaryCase_summaryVectorValues( caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmObjectHandle* RimSummaryCase_summaryVectorValues::execute()
|
||||
{
|
||||
QStringList addressStrings = m_addressString().split( ";", QString::SkipEmptyParts );
|
||||
|
||||
auto* summaryCase = self<RimSummaryCase>();
|
||||
RifSummaryReaderInterface* sumReader = summaryCase->summaryReader();
|
||||
|
||||
@ -200,8 +198,6 @@ RimSummaryCase_resampleValues::RimSummaryCase_resampleValues( caf::PdmObjectHand
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmObjectHandle* RimSummaryCase_resampleValues::execute()
|
||||
{
|
||||
QStringList addressStrings = m_addressString().split( ";", QString::SkipEmptyParts );
|
||||
|
||||
auto* summaryCase = self<RimSummaryCase>();
|
||||
RifSummaryReaderInterface* sumReader = summaryCase->summaryReader();
|
||||
|
||||
|
@ -103,8 +103,6 @@ void RigGeoMechWellLogExtractor::performCurveDataSmoothing( int
|
||||
|
||||
if ( !mds->empty() && !values->empty() )
|
||||
{
|
||||
std::vector<std::vector<double>*> dependentValues = {tvds, &interfaceShValuesDbl, &interfacePorePressuresDbl};
|
||||
|
||||
std::vector<unsigned char> smoothOrFilterSegments = determineFilteringOrSmoothing( interfacePorePressuresDbl );
|
||||
|
||||
smoothSegments( mds, tvds, values, interfaceShValuesDbl, smoothOrFilterSegments, smoothingTreshold );
|
||||
@ -577,14 +575,6 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData( const RigFemResultAddres
|
||||
RigFemResultAddress stressResAddr( RIG_ELEMENT_NODAL, "ST", "" );
|
||||
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, "POR-Bar", "" );
|
||||
|
||||
// Allow POR as an element property value
|
||||
RigFemResultAddress ppSandElementPropertyAddr =
|
||||
RigWbsParameter::PP_Reservoir().femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
||||
|
||||
RigFemResultAddress poissonResAddr =
|
||||
RigWbsParameter::poissonRatio().femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
||||
RigFemResultAddress ucsResAddr = RigWbsParameter::UCS().femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
||||
|
||||
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
||||
|
||||
// Load results
|
||||
|
@ -861,10 +861,9 @@ void GeometryTools::calculatePartiallyFreeCubeFacePolygon(
|
||||
|
||||
// Check for holes
|
||||
|
||||
bool hasHoles = false;
|
||||
for ( size_t i = 0; i < isConnectionPolygonMerged.size(); ++i )
|
||||
{
|
||||
hasHoles = !isConnectionPolygonMerged[i];
|
||||
bool hasHoles = !isConnectionPolygonMerged[i];
|
||||
if ( hasHoles )
|
||||
{
|
||||
*m_partiallyFreeCubeFaceHasHoles = true;
|
||||
|
Loading…
Reference in New Issue
Block a user