From ef70431f02e2ec13ecedab7ac342574e52d1877b Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Wed, 8 Apr 2026 11:51:08 +0300 Subject: apt: push to emplace C++11 if possible References: - https://www.reddit.com/r/cpp_questions/comments/pm63yx/why_clangtidy_says_use_emplace_back_instead_of/ - https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html --- apt-pkg/contrib/strutl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib/strutl.cc') 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 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; -- cgit v1.2.3-70-g09d2