From af5b9453a1908021cf75c348522c1a12eeb0dee4 Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Wed, 8 Apr 2026 11:37:24 +0300 Subject: 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 --- cmdline/apt-helper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-helper.cc') 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 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); -- cgit v1.2.3-70-g09d2