Skip to content

Commit 2135171

Browse files
minor cleanup
1 parent e9b9af8 commit 2135171

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

include/dspatch/Circuit.h

+11-13
Original file line numberDiff line numberDiff line change
@@ -777,21 +777,19 @@ inline void Circuit::Optimize()
777777
inline void Circuit::_Optimize()
778778
{
779779
// scan for optimal series order -> update _components
780-
{
781-
std::vector<DSPatch::Component*> orderedComponents;
782-
orderedComponents.reserve( _components.size() );
783-
784-
for ( auto component : _components )
785-
{
786-
component->Scan( orderedComponents );
787-
}
788-
for ( auto component : _components )
789-
{
790-
component->EndScan();
791-
}
780+
std::vector<DSPatch::Component*> orderedComponents;
781+
orderedComponents.reserve( _components.size() );
792782

793-
_components = std::move( orderedComponents );
783+
for ( auto component : _components )
784+
{
785+
component->Scan( orderedComponents );
794786
}
787+
for ( auto component : _components )
788+
{
789+
component->EndScan();
790+
}
791+
792+
_components = std::move( orderedComponents );
795793

796794
// scan for optimal parallel order -> update _componentsParallel
797795
std::vector<std::vector<DSPatch::Component*>> componentsMap;

0 commit comments

Comments
 (0)