diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2024-11-14 19:08:42 +0100 |
|---|---|---|
| committer | наб <nabijaczleweli@nabijaczleweli.xyz> | 2024-11-14 19:08:42 +0100 |
| commit | fdd846cd67def08f04cc616530adc144fc5435d7 (patch) | |
| tree | ba6a7692e236e50b4dfa40a90d1e653406e422f2 | |
| parent | caf668388f2be7546989c97ab19ec4caeda73c92 (diff) | |
(+=)+= -> append().append()
| -rw-r--r-- | apt-pkg/contrib/fileutl.cc | 8 | ||||
| -rw-r--r-- | apt-pkg/deb/deblistparser.cc | 2 | ||||
| -rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 | ||||
| -rw-r--r-- | ftparchive/override.cc | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index bd7076701..bb3422bcb 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -755,9 +755,11 @@ string flCombine(string Dir,string File) return File; if (File.length() >= 2 && File[0] == '.' && File[1] == '/') return File; - if (Dir[Dir.length()-1] == '/') - return Dir += File; - return (Dir += '/') += File; + + if (Dir.back() != '/') + Dir.append("/"); + Dir.append(File); + return Dir; } /*}}}*/ // flAbsPath - Return the absolute path of the filename /*{{{*/ diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 3f37d2134..c9e31c645 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -846,7 +846,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, // … but this is probably the best thing to do anyway if (Package.substr(found + 1) == "native") { - std::string const Pkg = (std::string{Package.substr(0, found)} += ':') += Ver.Cache()->NativeArch(); + std::string const Pkg = std::string{Package, 0, found}.append(":").append(Ver.Cache()->NativeArch()); if (NewDepends(Ver, Pkg, "any", Version, Op | pkgCache::Dep::ArchSpecific, Type) == false) return false; } diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 03221ce32..650e259ef 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -761,7 +761,7 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line) char* buf = NULL; size_t bufsize = 0; if (getline(&buf, &bufsize, dpkg) != -1) - (pkgname += ':') += buf; + pkgname.append(":").append(buf); free(buf); fclose(dpkg); } @@ -2376,7 +2376,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) pkgver = Ver.VerStr() == NULL ? "unknown" : Ver.VerStr(); // if the file exists already, we check: - // - if it was reported already (touched by apport). + // - if it was reported already (touched by apport). // If not, we do nothing, otherwise // we overwrite it. This is the same behaviour as apport // - if we have a report with the same pkgversion already diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 1a016b589..ad5578966 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -211,7 +211,7 @@ bool Override::ReadExtraOverride(string const &File,bool const &/*Source*/) Override::Item* Override::GetItem(std::string_view const &Package, std::string_view const &Architecture) { map<string,Item>::const_iterator I = Mapping.find(Package); - map<string,Item>::iterator J = Mapping.find((std::string{Package} += '/') += Architecture); + map<string,Item>::iterator J = Mapping.find(std::string{Package}.append("/").append(Architecture)); if (I == Mapping.end() && J == Mapping.end()) { |
