summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorHerman Semenoff <GermanAizek@yandex.ru>2026-04-08 11:37:24 +0300
committerHerman Semenoff <GermanAizek@yandex.ru>2026-04-08 11:37:24 +0300
commitaf5b9453a1908021cf75c348522c1a12eeb0dee4 (patch)
treee5d3d569e51d24207eb0228615f5eedd37e08296 /apt-pkg/acquire-worker.cc
parent04dcfd52355ca06143a8aaca4afd718a22fb0ded (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 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 55897945c..d712f3e30 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -231,7 +231,7 @@ static void APT_NONNULL(3) ChangeSiteIsMirrorChange(std::string const &NewURI, p
if (URI::SiteOnly(NewURI) == URI::SiteOnly(desc.URI))
return;
- auto const firstSpace = desc.Description.find(" ");
+ auto const firstSpace = desc.Description.find(' ');
if (firstSpace != std::string::npos)
{
std::string const OldSite = desc.Description.substr(0, firstSpace);
@@ -277,8 +277,8 @@ bool pkgAcquire::Worker::RunMessages()
for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O)
(*O)->UsedMirror = UsedMirror;
- if (Itm->Description.find(" ") != string::npos)
- Itm->Description.replace(0, Itm->Description.find(" "), UsedMirror);
+ if (Itm->Description.find(' ') != string::npos)
+ Itm->Description.replace(0, Itm->Description.find(' '), UsedMirror);
}
}