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

small improvement

parent 50099681
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -16,8 +16,9 @@ std::shared_ptr < abstraction::OperationAbstraction > StringReaderRegistry::getA
return entry.first ( ss );
};
 
typename ext::deque < std::pair < std::function < bool ( std::istream & ) >, std::unique_ptr < Entry > > >::iterator callback = find_if ( getEntries ( ) [ group ].begin ( ), getEntries ( ) [ group ].end ( ), lambda );
if ( callback == getEntries ( ) [ group ].end ( ) )
const auto & entries = getEntries ( ) [ group ];
typename ext::deque < std::pair < std::function < bool ( std::istream & ) >, std::unique_ptr < Entry > > >::const_iterator callback = find_if ( entries.begin ( ), entries.end ( ), lambda );
if ( callback == entries.end ( ) )
throw exception::CommonException ( "Entry not available." );
 
return callback->second->getAbstraction ( );
......
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