summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.cc2
-rw-r--r--apt-pkg/contrib/strutl.cc2
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;