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);