diff options
| author | Julian Andres Klode <jak@debian.org> | 2026-04-08 10:41:13 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-04-08 10:41:13 +0000 |
| commit | fbde7ea4ce304a30e155a2bd9d014d196abbb496 (patch) | |
| tree | de51c6f3ce74d0b7fd1ddacd0812cd1cbe116c14 /apt-pkg/contrib | |
| parent | 5b649fb72ecdced056fb3daab02e88933cc7a32a (diff) | |
| parent | ef70431f02e2ec13ecedab7ac342574e52d1877b (diff) | |
Merge branch 'push-to-emplace-C++11' into 'main'
apt: push to emplace C++11 if possible
See merge request apt-team/apt!566
Diffstat (limited to 'apt-pkg/contrib')
| -rw-r--r-- | apt-pkg/contrib/fileutl.cc | 2 | ||||
| -rw-r--r-- | apt-pkg/contrib/strutl.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 69e6dc430..74f5ec8bc 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -3091,7 +3091,7 @@ std::vector<std::string> Glob(std::string const &pattern, int flags) // append results for(i=0;i<globbuf.gl_pathc;i++) - result.push_back(string(globbuf.gl_pathv[i])); + result.emplace_back(globbuf.gl_pathv[i]); globfree(&globbuf); return result; diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 4363ab818..bfd4967f5 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1335,7 +1335,7 @@ vector<string> VectorizeString(string_view const &haystack, char const &split) auto end = start; do { for (; end != haystack.end() && *end != split; ++end); - exploded.push_back(string(start, end)); + exploded.emplace_back(start, end); start = end + 1; } while (end != haystack.end() && (++end) != haystack.end()); return exploded; |
