summaryrefslogtreecommitdiff
path: root/apt-private/private-source.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2026-04-08 10:26:06 +0000
committerJulian Andres Klode <jak@debian.org>2026-04-08 10:26:06 +0000
commita6873075dcac5115706e001bc9640c8da0805e35 (patch)
treee5d3d569e51d24207eb0228615f5eedd37e08296 /apt-private/private-source.cc
parent04dcfd52355ca06143a8aaca4afd718a22fb0ded (diff)
parentaf5b9453a1908021cf75c348522c1a12eeb0dee4 (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-private/private-source.cc')
-rw-r--r--apt-private/private-source.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc
index ebd3a980c..eb7eee931 100644
--- a/apt-private/private-source.cc
+++ b/apt-private/private-source.cc
@@ -86,21 +86,21 @@ static pkgSrcRecords::Parser *FindSrc(const char *Name,
TmpSrc = TmpSrc.substr(4);
}
// extract release
- size_t found = TmpSrc.find_last_of("/");
+ size_t found = TmpSrc.find_last_of('/');
if (found != std::string::npos)
{
RelTag = TmpSrc.substr(found+1);
TmpSrc = TmpSrc.substr(0,found);
}
// extract the version
- found = TmpSrc.find_last_of("=");
+ found = TmpSrc.find_last_of('=');
if (found != std::string::npos)
{
VerTag = UserRequestedVerTag = TmpSrc.substr(found+1);
TmpSrc = TmpSrc.substr(0,found);
}
// extract arch
- found = TmpSrc.find_last_of(":");
+ found = TmpSrc.find_last_of(':');
if (found != std::string::npos)
{
ArchTag = TmpSrc.substr(found+1);
@@ -359,14 +359,14 @@ bool DoSource(CommandLine &CmdL)
while (pos != std::string::npos)
{
pos += strlen("\nVcs-");
- std::string vcs = srec.substr(pos,srec.find(":",pos)-pos);
+ std::string vcs = srec.substr(pos,srec.find(':',pos)-pos);
if(vcs == "Browser")
{
pos = srec.find("\nVcs-", pos);
continue;
}
pos += vcs.length()+2;
- std::string::size_type epos = srec.find("\n", pos);
+ std::string::size_type epos = srec.find('\n', pos);
std::string const uri = srec.substr(pos,epos-pos);
ioprintf(c1out, _("NOTICE: '%s' packaging is maintained in "
"the '%s' version control system at:\n"
@@ -806,7 +806,7 @@ bool DoBuildDep(CommandLine &CmdL)
WriteBuildDependencyPackage(buildDepsPkgFile, pseudo, pseudoArch,
GetBuildDeps(Last, Src.c_str(), hostArch));
std::string reltag = *I;
- size_t found = reltag.find_last_of("/");
+ size_t found = reltag.find_last_of('/');
if (found == std::string::npos)
reltag.clear();
else