diff options
| author | Herman Semenoff <GermanAizek@yandex.ru> | 2026-04-08 11:37:24 +0300 |
|---|---|---|
| committer | Herman Semenoff <GermanAizek@yandex.ru> | 2026-04-08 11:37:24 +0300 |
| commit | af5b9453a1908021cf75c348522c1a12eeb0dee4 (patch) | |
| tree | e5d3d569e51d24207eb0228615f5eedd37e08296 /cmdline | |
| parent | 04dcfd52355ca06143a8aaca4afd718a22fb0ded (diff) | |
apt: funcs called with a string literal consisting of a single character
Benchmark:
- https://stackoverflow.com/questions/62058906/why-my-performance-benchmark-gives-me-wrong-results
References:
- https://clang.llvm.org/extra/clang-tidy/checks/performance/prefer-single-char-overloads.html
Diffstat (limited to 'cmdline')
| -rw-r--r-- | cmdline/apt-helper.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index 4404259d8..0700de0f6 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -117,7 +117,7 @@ static bool DoSrvLookup(CommandLine &CmdL) /*{{{*/ std::vector<SrvRec> srv_records; std::string const name = CmdL.FileList[i]; c0out << "# Target\tPriority\tWeight\tPort # for " << name << std::endl; - size_t const found = name.find(":"); + size_t const found = name.find(':'); if (found != std::string::npos) { std::string const host = name.substr(0, found); |
