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/ui/dialog/object-attributes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/dialog/object-attributes.cpp') diff --git a/src/ui/dialog/object-attributes.cpp b/src/ui/dialog/object-attributes.cpp index 9e4339113..629f8c1c8 100644 --- a/src/ui/dialog/object-attributes.cpp +++ b/src/ui/dialog/object-attributes.cpp @@ -165,8 +165,8 @@ void ObjectAttributes::widget_setup (void) int len = 0; while (desc[len].label) { - labels.push_back(desc[len].label); - attrs.push_back (desc[len].attribute); + labels.emplace_back(desc[len].label); + attrs.emplace_back(desc[len].attribute); len += 1; } attrTable->set_object(obj, labels, attrs, (GtkWidget*)gobj()); -- cgit v1.2.3