From fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 18 Jun 2018 21:48:07 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-emplace=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reduces the boilerplate required to add a new element to a container. --- src/attribute-sort-util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/attribute-sort-util.cpp') diff --git a/src/attribute-sort-util.cpp b/src/attribute-sort-util.cpp index 28a4d4f5a..5df78eab6 100644 --- a/src/attribute-sort-util.cpp +++ b/src/attribute-sort-util.cpp @@ -96,7 +96,7 @@ void sp_attribute_sort_element(Node *repr) { Glib::ustring value = (const char*)iter->value; // C++11 my_list.emlace_back(attribute, value); - my_list.push_back(std::make_pair(attribute,value)); + my_list.emplace_back(attribute,value); } std::sort(my_list.begin(), my_list.end(), cmp); // Delete all attributes. @@ -183,7 +183,7 @@ void sp_attribute_sort_style(Node* repr, SPCSSAttr *css) { Glib::ustring value = (const char*)iter->value; // C++11 my_list.emlace_back(property, value); - my_list.push_back(std::make_pair(property,value)); + my_list.emplace_back(property,value); } std::sort(my_list.begin(), my_list.end(), cmp); // Delete all attributes. -- cgit v1.2.3