mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1292 Fixed CppCheck Issues in ProjectDataModel
This commit is contained in:
parent
b5e782dfc3
commit
6c0a866008
@ -70,7 +70,7 @@ RigFlowDiagResults* RimFlowDiagSolution::flowDiagResults()
|
||||
RimEclipseResultCase* eclCase;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
|
||||
CVF_ASSERT(eclCase && eclCase->reservoirData() && eclCase->reservoirData() );
|
||||
CVF_ASSERT(eclCase && eclCase->reservoirData() );
|
||||
|
||||
timeStepCount = eclCase->reservoirData()->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount();
|
||||
|
||||
|
@ -180,8 +180,7 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
|
||||
if (!m_case) return;
|
||||
|
||||
const RigSingleWellResultsData* wellResults = nullptr;
|
||||
wellResults = m_case->reservoirData()->findWellResult(m_wellName);
|
||||
const RigSingleWellResultsData* wellResults = m_case->reservoirData()->findWellResult(m_wellName);
|
||||
|
||||
if (!wellResults) return;
|
||||
|
||||
@ -450,8 +449,7 @@ QString RimWellAllocationPlot::wellStatusTextForTimeStep(const QString& wellName
|
||||
|
||||
if (eclipseResultCase)
|
||||
{
|
||||
const RigSingleWellResultsData* wellResults = nullptr;
|
||||
wellResults = eclipseResultCase->reservoirData()->findWellResult(wellName);
|
||||
const RigSingleWellResultsData* wellResults = eclipseResultCase->reservoirData()->findWellResult(wellName);
|
||||
|
||||
if (wellResults)
|
||||
{
|
||||
|
@ -224,9 +224,7 @@ const cvf::StructGridInterface* RimCellRangeFilterCollection::gridByIndex(int gr
|
||||
|
||||
if (mnGrid)
|
||||
{
|
||||
RigGridBase* grid = NULL;
|
||||
|
||||
grid = mnGrid->gridByIndex(gridIndex);
|
||||
RigGridBase* grid = mnGrid->gridByIndex(gridIndex);
|
||||
|
||||
CVF_ASSERT(grid);
|
||||
|
||||
|
@ -118,8 +118,6 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend)
|
||||
{
|
||||
if (resultVarNameOfNewLegend != RimDefines::ternarySaturationResultName())
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
QString legendResultVariable;
|
||||
|
||||
if (this->m_legendConfigPtrField())
|
||||
@ -129,6 +127,7 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend)
|
||||
|
||||
if (!this->m_legendConfigPtrField() || legendResultVariable != resultVarNameOfNewLegend)
|
||||
{
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < m_legendConfigData.size(); i++)
|
||||
{
|
||||
if (m_legendConfigData[i]->resultVariableName() == resultVarNameOfNewLegend)
|
||||
|
@ -248,11 +248,10 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
||||
size_t inputPropCount = this->m_inputPropertyCollection()->inputProperties.size();
|
||||
|
||||
caf::ProgressInfo progInfo(static_cast<int>(filenames.size() * inputPropCount), "Reading Input properties" );
|
||||
int progress = 0;
|
||||
|
||||
for_all(filenames, i)
|
||||
{
|
||||
progress = static_cast<int>(i*inputPropCount);
|
||||
int progress = static_cast<int>(i*inputPropCount);
|
||||
// Find all the keywords present on the file
|
||||
|
||||
progInfo.setProgressDescription(filenames[i]);
|
||||
|
@ -632,7 +632,7 @@ cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox()
|
||||
this->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
/*
|
||||
RimEclipseView* eclView = nullptr;
|
||||
this->firstAncestorOrThisOfType(eclView);
|
||||
|
||||
@ -644,7 +644,7 @@ cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox()
|
||||
|
||||
if(false)//useAllCells) // For now, only use the active CellsBBox.
|
||||
return rimCase->allCellsBoundingBox();
|
||||
else
|
||||
else */
|
||||
return rimCase->activeCellsBoundingBox();
|
||||
|
||||
}
|
||||
|
@ -88,8 +88,6 @@ QList<caf::PdmOptionItemInfo> RimMultiSnapshotDefinition::calculateValueOptions(
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
if (fieldNeedingOptions == &view)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo("None", nullptr));
|
||||
|
@ -343,7 +343,7 @@ int RimSummaryCurveAppearanceCalculator::cycledLineThickness(int index)
|
||||
static const int thicknesses[] ={ 1, 3, 5 };
|
||||
|
||||
if (index < 0) return 1;
|
||||
return (thicknesses[(index) % 3]);
|
||||
return (thicknesses[(index) % thicknessCount]);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -31,7 +31,7 @@ class RifEclipseSummaryAddress;
|
||||
class RimSummaryCurveAppearanceCalculator
|
||||
{
|
||||
public:
|
||||
RimSummaryCurveAppearanceCalculator(const std::set<std::pair<RimSummaryCase*, RifEclipseSummaryAddress> >& curveDefinitions);
|
||||
explicit RimSummaryCurveAppearanceCalculator(const std::set<std::pair<RimSummaryCase*, RifEclipseSummaryAddress> >& curveDefinitions);
|
||||
enum CurveAppearanceType
|
||||
{
|
||||
NONE,
|
||||
|
@ -513,9 +513,6 @@ void RimSummaryCurveFilter::createSetOfCasesAndResultAdresses(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurveFilter::createCurvesFromCurveDefinitions(const std::set<std::pair<RimSummaryCase*, RifEclipseSummaryAddress> >& curveDefinitions)
|
||||
{
|
||||
int colorIndex = 2;
|
||||
int lineStyleIdx = -1;
|
||||
|
||||
RimSummaryCase* prevCase = nullptr;
|
||||
RimPlotCurve::LineStyleEnum lineStyle = RimPlotCurve::STYLE_SOLID;
|
||||
RimSummaryCurveAppearanceCalculator curveLookCalc(curveDefinitions);
|
||||
|
Loading…
Reference in New Issue
Block a user