mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy performance-faster-string-find warnings
This commit is contained in:
parent
f4c47d0357
commit
178d7f4cd0
2 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ Checks: [-*,
|
||||||
bugprone-*,
|
bugprone-*,
|
||||||
performance-avoid-endl,
|
performance-avoid-endl,
|
||||||
performance-enum-size,
|
performance-enum-size,
|
||||||
|
performance-faster-string-find,
|
||||||
|
|
||||||
# Skipping these temporarily because they are very noisy
|
# Skipping these temporarily because they are very noisy
|
||||||
-bugprone-narrowing-conversions,
|
-bugprone-narrowing-conversions,
|
||||||
|
|
|
@ -158,7 +158,7 @@ string CPPCompile::CaptureName(const ID* c) const {
|
||||||
// We want to strip both the module and any inlining appendage.
|
// We want to strip both the module and any inlining appendage.
|
||||||
auto tn = trim_name(c);
|
auto tn = trim_name(c);
|
||||||
|
|
||||||
auto appendage = tn.find(".");
|
auto appendage = tn.find('.');
|
||||||
if ( appendage != string::npos )
|
if ( appendage != string::npos )
|
||||||
tn.erase(tn.begin() + appendage, tn.end());
|
tn.erase(tn.begin() + appendage, tn.end());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue