From b96946772e372a8c0be03b8a7f35128612fd85de Mon Sep 17 00:00:00 2001 From: kyle-cochran Date: Wed, 11 Oct 2023 13:53:39 -0700 Subject: [PATCH] refactor: expandedSubsets array simplification from Vishwa Co-authored-by: Vishwa Shah --- .../Astrodynamics/Trajectory/StateBuilder.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.cpp b/src/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.cpp index 9b8a5420b..0fcd6c580 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.cpp @@ -208,11 +208,7 @@ const StateBuilder StateBuilder::expand(const Shared& a throw ostk::core::error::RuntimeError("Duplicate CoordinatesSubset: [{}]", aCoordinatesSubsetSPtr->getName()); } - Array> expandedSubsets = Array>::Empty(); - for (const auto& subset : this->coordinatesBrokerSPtr_->getSubsets()) - { - expandedSubsets.add(subset); - } + Array> expandedSubsets = coordinatesBrokerSPtr_->getSubsets(); expandedSubsets.add(aCoordinatesSubsetSPtr); return StateBuilder(this->frameSPtr_, expandedSubsets);