diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp index 4560bdb7d6..9e0500c391 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp @@ -746,7 +746,7 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( exportInfo->setHasSubGridIntersections( exportInfo->hasSubGridIntersections() || foundSubGridIntersections ); // branch->sortSegments(); - std::vector connectedWellPaths = wellPathsWithTieIn( wellPath ); + auto connectedWellPaths = wellPathsWithTieIn( wellPath ); for ( auto childWellPath : connectedWellPaths ) { auto childMswBranch = createChildMswBranch( childWellPath ); @@ -844,7 +844,7 @@ bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( exportInfo->setHasSubGridIntersections( exportInfo->hasSubGridIntersections() || foundSubGridIntersections ); branch->sortSegments(); - std::vector connectedWellPaths = wellPathsWithTieIn( wellPath ); + auto connectedWellPaths = wellPathsWithTieIn( wellPath ); for ( auto childWellPath : connectedWellPaths ) { auto childMswBranch = createChildMswBranch( childWellPath ); @@ -941,7 +941,7 @@ bool RicWellPathExportMswCompletionsImpl::generatePerforationsMswExportInfo( exportInfo->setHasSubGridIntersections( exportInfo->hasSubGridIntersections() || foundSubGridIntersections ); branch->sortSegments(); - std::vector connectedWellPaths = wellPathsWithTieIn( wellPath ); + auto connectedWellPaths = wellPathsWithTieIn( wellPath ); for ( auto childWellPath : connectedWellPaths ) { @@ -1879,8 +1879,7 @@ void RicWellPathExportMswCompletionsImpl::assignBranchNumbersToBranch( const Rim //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::unique_ptr - RicWellPathExportMswCompletionsImpl::createChildMswBranch( const RimModeledWellPath* childWellPath ) +std::unique_ptr RicWellPathExportMswCompletionsImpl::createChildMswBranch( const RimWellPath* childWellPath ) { auto initialChildMD = childWellPath->wellPathTieIn()->tieInMeasuredDepth(); auto initialChildTVD = -childWellPath->wellPathGeometry()->interpolatedPointAlongWellPath( initialChildMD ).z(); @@ -1919,18 +1918,16 @@ std::unique_ptr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RicWellPathExportMswCompletionsImpl::wellPathsWithTieIn( const RimWellPath* wellPath ) +std::vector RicWellPathExportMswCompletionsImpl::wellPathsWithTieIn( const RimWellPath* wellPath ) { - std::vector connectedWellPaths; + std::vector connectedWellPaths; { auto wellPaths = RimProject::current()->allWellPaths(); - for ( auto w : wellPaths ) + for ( auto well : wellPaths ) { - auto modelWellPath = dynamic_cast( w ); - if ( modelWellPath && modelWellPath->isEnabled() && modelWellPath->wellPathTieIn() && - modelWellPath->wellPathTieIn()->parentWell() == wellPath ) + if ( well && well->isEnabled() && well->wellPathTieIn() && well->wellPathTieIn()->parentWell() == wellPath ) { - connectedWellPaths.push_back( modelWellPath ); + connectedWellPaths.push_back( well ); } } } diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.h index 9cb06cf016..a29c8b985a 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.h @@ -193,7 +193,7 @@ private: gsl::not_null branch, gsl::not_null branchNumber ); - static std::unique_ptr createChildMswBranch( const RimModeledWellPath* childWellPath ); + static std::unique_ptr createChildMswBranch( const RimWellPath* childWellPath ); - static std::vector wellPathsWithTieIn( const RimWellPath* wellPath ); + static std::vector wellPathsWithTieIn( const RimWellPath* wellPath ); };