diff --git a/alib2algo/src/regexp/RegExpOptimize.cpp b/alib2algo/src/regexp/RegExpOptimize.cpp index 9203ccb549a6d302c7720ceca72fcde8b0ebff2e..ca6b5d32b5a8552b1086e1f14ea8bb893ae011da 100644 --- a/alib2algo/src/regexp/RegExpOptimize.cpp +++ b/alib2algo/src/regexp/RegExpOptimize.cpp @@ -294,8 +294,6 @@ bool RegExpOptimize::A3( UnboundedRegExpAlternation * const & node ) // input can be \0 + \0, so at least one element must be preserved - // FIXME: alib2 uses shared_ptrs, rewrite this using remove_if then - for( auto it = node->elements.begin( ); it != node->elements.end( ); ) { UnboundedRegExpEmpty const * const & empty = dynamic_cast<UnboundedRegExpEmpty const *>( * it ); @@ -331,11 +329,6 @@ bool RegExpOptimize::A4( UnboundedRegExpAlternation * const & node ) * As we always sort in optimization, we can use the first version, but A4 must be __always__ called __after__ A2 */ - // uncomment if smart ptrs used - // node->elements.unique( [ ]( UnboundedRegExpElement const * const & a, UnboundedRegExpElement const * const & b ) -> bool { - // return *a == *b; - // } ); - bool optimized = false; if(node->elements.size() != 0) for( auto it = std::next( node->elements.begin( ) ); it != node->elements.end( ); ) { @@ -398,8 +391,6 @@ bool RegExpOptimize::A6( UnboundedRegExpConcatenation * const & node ) { bool optimized = false; - // FIXME: alib2 uses shared_ptrs, rewrite this using remove_if then - for( auto it = node->elements.begin( ); it != node->elements.end( ); ) { UnboundedRegExpEpsilon* epsilon = dynamic_cast<UnboundedRegExpEpsilon*>( * it );