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

fix cast introspection command

parent 57b6c4c4
No related branches found
No related tags found
No related merge requests found
...@@ -244,7 +244,7 @@ std::pair < bool, bool > Parser::introspect_cast_from_to ( ) { ...@@ -244,7 +244,7 @@ std::pair < bool, bool > Parser::introspect_cast_from_to ( ) {
from = true; from = true;
} else if ( check_nonreserved_kw ( "to" ) ) { } else if ( check_nonreserved_kw ( "to" ) ) {
match_nonreserved_kw ( "to" ); match_nonreserved_kw ( "to" );
from = true; to = true;
} else { } else {
throw exception::CommonException ( "Mismatched set while expanding param introspect_cast_from_to." ); throw exception::CommonException ( "Mismatched set while expanding param introspect_cast_from_to." );
} }
......
...@@ -73,8 +73,8 @@ std::set < std::string > CastRegistry::listFrom ( const std::string & type ) { ...@@ -73,8 +73,8 @@ std::set < std::string > CastRegistry::listFrom ( const std::string & type ) {
std::set < std::string > res; std::set < std::string > res;
   
for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) ) for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) )
if ( sourceTypes.count ( entry.first.first ) ) if ( sourceTypes.count ( entry.first.second ) )
res.insert ( entry.first.second ); res.insert ( entry.first.first );
   
return res; return res;
} }
...@@ -90,8 +90,8 @@ std::set < std::string > CastRegistry::listTo ( const std::string & type ) { ...@@ -90,8 +90,8 @@ std::set < std::string > CastRegistry::listTo ( const std::string & type ) {
std::set < std::string > res; std::set < std::string > res;
   
for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) ) for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) )
if ( targetTypes.count ( entry.first.second ) ) if ( targetTypes.count ( entry.first.first ) )
res.insert ( entry.first.first ); res.insert ( entry.first.second );
   
return res; return res;
} }
......
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