mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
Refactor: avoid local variable only used in range-based for loops
This commit is contained in:
1 parent
e862bd259f
commit
873282b339
12 files changed
+32
-68
No files matched your search
@@ -197,8 +197,7 @@ Rim3dView::~Rim3dView()
|
||||
|
||||
if ( auto proj = RimProject::current() )
|
||||
{
|
||||
std::vector<Rim3dView*> allViews = proj->allViews();
|
||||
for ( auto v : allViews )
|
||||
for ( auto v : proj->allViews() )
|
||||
{
|
||||
if ( v->activeComparisonView() == this )
|
||||
{
|
||||
@@ -589,10 +588,8 @@ std::vector<Rim3dView*> Rim3dView::validComparisonViews() const
|
||||
{
|
||||
auto isIntersectionView = []( const Rim3dView* view ) { return dynamic_cast<const Rim2dIntersectionView*>( view ) != nullptr; };
|
||||
|
||||
std::vector<Rim3dView*> views = RimProject::current()->allViews();
|
||||
|
||||
std::vector<Rim3dView*> validComparisonViews;
|
||||
for ( auto view : views )
|
||||
for ( auto view : RimProject::current()->allViews() )
|
||||
{
|
||||
if ( dynamic_cast<RimSeismicView*>( view ) ) continue;
|
||||
|
||||
|
||||
Reference in new issue
Block a user