void Product::StripScalars( OperandList& scalarList ) { for( OperandList::Node* node = operandList.Head(); node; node = node->Next() ) { ScaledSymbol* scaledSymbol = dynamic_cast< ScaledSymbol* >( node->data ); if( scaledSymbol && scaledSymbol->scalar ) { scalarList.InsertAfter()->data = scaledSymbol->scalar; scaledSymbol->scalar = nullptr; } Product* product = dynamic_cast< Product* >( node->data ); if( product ) product->StripScalars( scalarList ); } }