Refactor: avoid local variable only used in range-based for loops

This commit is contained in:
Kristian Bendiksen
2024-04-04 08:50:28 +02:00
parent e862bd259f
commit 873282b339
12 changed files with 32 additions and 68 deletions

View File

@@ -277,9 +277,8 @@ caf::PdmScriptResponse RicExportContourMapToTextFeature::execute()
RimProject* proj = app->project();
CAF_ASSERT( proj );
std::vector<Rim3dView*> allViews = proj->allViews();
Rim3dView* myView = nullptr;
for ( auto view : allViews )
Rim3dView* myView = nullptr;
for ( auto view : proj->allViews() )
{
if ( m_viewId == view->id() )
{