Skip to content
Snippets Groups Projects
Commit 50edcf2d authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix conversions of unique_ptrs

parent 4e3d579d
No related branches found
No related tags found
No related merge requests found
...@@ -91,7 +91,7 @@ std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDe ...@@ -91,7 +91,7 @@ std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDe
for(const auto& child : alternation.getElements()) for(const auto& child : alternation.getElements())
ret->appendElement( * ( child->accept<std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > >, regexp::RegExpDerivation::Unbounded > ( argument ) ) ); ret->appendElement( * ( child->accept<std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > >, regexp::RegExpDerivation::Unbounded > ( argument ) ) );
   
return ret; return std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > ( std::move ( ret ) );
} }
   
std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDerivation::Unbounded::visit(const regexp::UnboundedRegExpConcatenation < alphabet::Symbol > & concatenation, const alphabet::Symbol& argument) { std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDerivation::Unbounded::visit(const regexp::UnboundedRegExpConcatenation < alphabet::Symbol > & concatenation, const alphabet::Symbol& argument) {
...@@ -111,14 +111,14 @@ std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDe ...@@ -111,14 +111,14 @@ std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDe
break; break;
} }
   
return ret; return std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > ( std::move ( ret ) );
} }
   
std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDerivation::Unbounded::visit(const regexp::UnboundedRegExpIteration < alphabet::Symbol > & iteration, const alphabet::Symbol& argument) { std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDerivation::Unbounded::visit(const regexp::UnboundedRegExpIteration < alphabet::Symbol > & iteration, const alphabet::Symbol& argument) {
UnboundedRegExpConcatenation < alphabet::Symbol > * con = new regexp::UnboundedRegExpConcatenation < alphabet::Symbol > ( ); std::unique_ptr < UnboundedRegExpConcatenation < alphabet::Symbol > > con ( new regexp::UnboundedRegExpConcatenation < alphabet::Symbol > ( ) );
con->appendElement ( * ( iteration.getElement().accept<std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > >, regexp::RegExpDerivation::Unbounded > ( argument ) ) ); con->appendElement ( * ( iteration.getElement().accept<std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > >, regexp::RegExpDerivation::Unbounded > ( argument ) ) );
con->appendElement ( iteration ); con->appendElement ( iteration );
return std::unique_ptr < UnboundedRegExpElement < alphabet::Symbol > > ( con ); return std::unique_ptr < UnboundedRegExpElement < alphabet::Symbol > > ( std::move ( con ) );
} }
   
std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDerivation::Unbounded::visit(const regexp::UnboundedRegExpSymbol < alphabet::Symbol > & symbol, const alphabet::Symbol& argument) { std::unique_ptr < regexp::UnboundedRegExpElement < alphabet::Symbol > > RegExpDerivation::Unbounded::visit(const regexp::UnboundedRegExpSymbol < alphabet::Symbol > & symbol, const alphabet::Symbol& argument) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment