From 000a8cd5e9f69c7f7cf2ac3858d34456730f04db 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 2d98a8121..03ac4041f 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Trajectory/StateBuilder.cpp @@ -219,11 +219,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);