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/object/box3d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/object/box3d.cpp') diff --git a/src/object/box3d.cpp b/src/object/box3d.cpp index 7b5e44f65..df95f4f84 100644 --- a/src/object/box3d.cpp +++ b/src/object/box3d.cpp @@ -1311,8 +1311,8 @@ gchar *SPBox3D::description() const { static inline void box3d_push_back_corner_pair(SPBox3D const *box, std::list > &pts, int c1, int c2) { - pts.push_back(std::make_pair(box3d_get_corner_screen(box, c1, false), - box3d_get_corner_screen(box, c2, false))); + pts.emplace_back(box3d_get_corner_screen(box, c1, false), + box3d_get_corner_screen(box, c2, false)); } void SPBox3D::convert_to_guides() const { -- cgit v1.2.3