diff --git a/.clang-tidy b/.clang-tidy index e92ef5137a1f6ca104b038edc8a52ce49fa907a6..f56e5b4e940d0fa01699b748bbe5a1b055a02f9c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: '-*,bugprone-*,modernize-*,-modernize-use-auto,-modernize-loop-convert,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-using,-modernize-avoid-bind,-modernize-return-braced-init-list,-modernize-use-transparent-functors,-modernize-redundant-void-arg' +Checks: '-*,bugprone-*,misc-string-compare,modernize-*,performance-faster-string-find,-modernize-use-auto,-modernize-loop-convert,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-using,-modernize-avoid-bind,-modernize-return-braced-init-list,-modernize-use-transparent-functors,-modernize-redundant-void-arg' WarningsAsErrors: '*' HeaderFilterRegex: '' AnalyzeTemporaryDtors: false diff --git a/src/core/config/Config.cpp b/src/core/config/Config.cpp index 54c147b00caf44ca3f616d0f6ac74661fc51dc2f..33bae7dc35851073d2b2e75d5d4d18031fdeb00f 100644 --- a/src/core/config/Config.cpp +++ b/src/core/config/Config.cpp @@ -273,7 +273,7 @@ void Config::parseFromFile( const char* filename, Block& block, unsigned int lev { input.ignore( 1 ); while( (value.find("$(") != value.npos) && (value.find(')') != value.npos) ) { - size_t s = value.find("$("); size_t e = value.find(")"); + size_t s = value.find("$("); size_t e = value.find(')'); ValueReplacementMap::iterator mkey = valueReplacements_.find( value.substr( s+2, e-s+1-3 ) ); if(mkey != valueReplacements_.end()) { value.replace( s,e-s+1, mkey->second ); @@ -315,7 +315,7 @@ void Config::parseFromString( const std::string & str, Block& block, unsigned in while (!input.empty()) { std::string::size_type f=input.find_first_of(" {"); if (input[f]==' ') { - std::string::size_type posSemicolon = input.substr(f+1).find(";"); + std::string::size_type posSemicolon = input.substr(f+1).find(';'); block.addParameter(input.substr(0,f),input.substr(f+1,posSemicolon)); input = input.substr(f+1+posSemicolon+1); } else { @@ -406,7 +406,7 @@ void Config::extractBlock( const char* filename, std::stringstream& input, Block { input.ignore( 1 ); while( (value.find("$(") != value.npos) && (value.find(')') != value.npos) ) { - size_t s = value.find("$("); size_t e = value.find(")"); + size_t s = value.find("$("); size_t e = value.find(')'); ValueReplacementMap::iterator mkey = valueReplacements_.find( value.substr( s+2, e-s+1-3 ) ); if(mkey != valueReplacements_.end()) { value.replace( s,e-s+1, mkey->second ); diff --git a/src/core/config/Create.cpp b/src/core/config/Create.cpp index 7e945cfd8ccaf98ffae168d5d6bde592df24641d..8e90173e7c480fe8538b664020494d21e32e235e 100644 --- a/src/core/config/Create.cpp +++ b/src/core/config/Create.cpp @@ -261,7 +261,7 @@ namespace config { throw std::runtime_error( usageString(argv[0]) ); - auto dotPosition = filename.find_last_of("."); + auto dotPosition = filename.find_last_of('.'); int numberOfZeros=0; if ( dotPosition != std::string::npos )