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 /methods | |
| 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 'methods')
| -rw-r--r-- | methods/basehttp.cc | 2 | ||||
| -rw-r--r-- | methods/mirror.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc index d335e6fa0..db0ed228f 100644 --- a/methods/basehttp.cc +++ b/methods/basehttp.cc @@ -330,7 +330,7 @@ static std::string fixURIEncoding(std::string const &part) { // if the server sends a space this is not an encoded URI // so other clients seem to encode it and we do it as well - if (part.find_first_of(" ") != std::string::npos) + if (part.find_first_of(' ') != std::string::npos) return aptMethod::URIEncode(part); return part; } diff --git a/methods/mirror.cc b/methods/mirror.cc index 6da0b4258..6fbaa40e6 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -334,7 +334,7 @@ std::string MirrorMethod::GetMirrorFileURI(std::string const &Message, FetchItem auto const colon = uristr.find(':'); if (unlikely(colon == std::string::npos)) continue; - auto const plus = uristr.find("+"); + auto const plus = uristr.find('+'); if (plus < colon) { // started as tor+mirror+http we want to get the file via tor+http |
