summaryrefslogtreecommitdiffstats
path: root/src/attribute-sort-util.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-18 19:48:07 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-18 19:48:07 +0000
commitfcf93adf1e766fbc69b05e598ee0aeb9b36b1c70 (patch)
tree724178e38d88307e7b4129479006dc2ec122c410 /src/attribute-sort-util.cpp
parentRun clang-tidy’s modernize-use-noexcept pass. (diff)
downloadinkscape-fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70.tar.gz
inkscape-fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70.zip
Run clang-tidy’s modernize-use-emplace pass.
This reduces the boilerplate required to add a new element to a container.
Diffstat (limited to 'src/attribute-sort-util.cpp')
-rw-r--r--src/attribute-sort-util.cpp4
1 files changed, 2 insertions, 2 deletions
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.