CppCheck : Move to inner most scope

This commit is contained in:
Magne Sjaastad
2018-10-12 16:33:49 +02:00
parent e8224bc7b8
commit 39088fa9ba
2 changed files with 3 additions and 5 deletions

View File

@@ -193,15 +193,13 @@ void RicCreateMultipleFracturesFeature::onActionTriggered(bool isChecked)
RimProject* proj = app->project();
RimEclipseCase* firstSourceCase = nullptr;
int topK = 0;
int baseK = 0;
if (!proj->eclipseCases().empty())
{
firstSourceCase = proj->eclipseCases().front();
auto ijkRange = ijkRangeForGrid(firstSourceCase);
topK = static_cast<int>(ijkRange.first.z());
baseK = static_cast<int>(ijkRange.second.z());
int topK = static_cast<int>(ijkRange.first.z());
int baseK = static_cast<int>(ijkRange.second.z());
double minimumDistanceFromTip = 100.0;
int maxFractureCount = 100;

View File

@@ -319,10 +319,10 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
{
for (auto w : m_wellPaths)
{
int fractureCountForWell = 0;
auto wellPathGeometry = w->wellPathGeometry();
if (wellPathGeometry)
{
int fractureCountForWell = 0;
auto options = fractureOptions(m_sourceCase->eclipseCaseData(), w, this->options());
auto mdOfWellPathTip = wellPathGeometry->measureDepths().back();
double lastFracMd = mdOfWellPathTip;