diff options
| author | Julian Andres Klode <jak@debian.org> | 2026-04-08 10:26:06 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-04-08 10:26:06 +0000 |
| commit | a6873075dcac5115706e001bc9640c8da0805e35 (patch) | |
| tree | e5d3d569e51d24207eb0228615f5eedd37e08296 /apt-pkg/deb | |
| parent | 04dcfd52355ca06143a8aaca4afd718a22fb0ded (diff) | |
| parent | af5b9453a1908021cf75c348522c1a12eeb0dee4 (diff) | |
Merge branch 'str-to-chars' into 'main'
apt: funcs called with a string literal consisting of a single character
See merge request apt-team/apt!563
Diffstat (limited to 'apt-pkg/deb')
| -rw-r--r-- | apt-pkg/deb/debmetaindex.cc | 2 | ||||
| -rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index b85163654..8fcb83678 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -1318,7 +1318,7 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type /*{{{*/ /// allows you to match a.b.c against itself, .b.c, and .c, but not b.c static inline std::string NextLevelDomain(std::string Host) { - auto nextDot = Host.find(".", 1); + auto nextDot = Host.find('.', 1); if (nextDot == Host.npos) return ""; return Host.substr(nextDot); diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 0f2467607..395227f50 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -646,7 +646,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line) } // At this point we have a pkgname, but it might not be arch-qualified ! - if (pkgname.find(":") == std::string::npos) + if (pkgname.find(':') == std::string::npos) { pkgCache::GrpIterator const Grp = Cache.FindGrp(pkgname); if (unlikely(Grp.end()== true)) @@ -779,7 +779,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line) } std::string arch = ""; - if (pkgname.find(":") != string::npos) + if (pkgname.find(':') != string::npos) arch = StringSplit(pkgname, ":")[1]; std::string i18n_pkgname = pkgname; if (arch.size() != 0) |
