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

clang-tidy: modernize the code by using empty

parent 9785feb9
No related branches found
No related tags found
1 merge request!172Clang tidy fixes merge
......@@ -26,7 +26,7 @@ automaton::DFA < std::string, unsigned > NumberModuloAutomaton::generate ( unsig
base_map.push_back ( ext::to_string ( i ) );
 
for ( unsigned i = 10; i < base; ++ i )
base_map.push_back ( std::string ( 'A' + i, 1 ) );
base_map.emplace_back ( 'A' + i, 1 );
 
automaton::DFA < std::string, unsigned > res ( 0 );
 
......
......@@ -18,7 +18,7 @@ class StringLineInterface final : public cli::LineInterface {
std::string m_string;
 
bool readline ( std::string & line, bool ) override {
if ( m_string == "" )
if ( m_string.empty ( ) )
return false;
 
line = std::exchange ( m_string, "" );
......
......@@ -41,7 +41,7 @@ std::string TestFiles::GetOne ( const std::regex& regex ) {
if ( res.size ( ) > 1 )
throw std::invalid_argument ( "Multiple files found for TestFiles::GetOne in '"s + std::string ( TEST_FILES_BASEDIR ) + "'"s );
 
if ( res.size ( ) == 0 )
if ( res.empty ( ) )
throw std::invalid_argument ( "No files found for TestFiles::GetOne. TestFilesDir is "s + std::string ( TEST_FILES_BASEDIR ) + "'"s );
 
return res.at ( 0 );
......
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