diff --git a/.clang-tidy b/.clang-tidy index 215b5a5e26..f3381a7b75 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,6 +2,7 @@ Checks: [-*, bugprone-*, performance-avoid-endl, performance-enum-size, + performance-faster-string-find, # Skipping these temporarily because they are very noisy -bugprone-narrowing-conversions, diff --git a/src/script_opt/CPP/Vars.cc b/src/script_opt/CPP/Vars.cc index 893a1231a0..62888c6ee1 100644 --- a/src/script_opt/CPP/Vars.cc +++ b/src/script_opt/CPP/Vars.cc @@ -158,7 +158,7 @@ string CPPCompile::CaptureName(const ID* c) const { // We want to strip both the module and any inlining appendage. auto tn = trim_name(c); - auto appendage = tn.find("."); + auto appendage = tn.find('.'); if ( appendage != string::npos ) tn.erase(tn.begin() + appendage, tn.end());