From 66e62eb4c82dbe7b7db36d89847f79a6658bb22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 4 Feb 2014 16:19:32 +0100 Subject: [PATCH] fix emplace_back --- include/llmr/geometry/binpack.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llmr/geometry/binpack.hpp b/include/llmr/geometry/binpack.hpp index b98a8d464..03b34c63d 100644 --- a/include/llmr/geometry/binpack.hpp +++ b/include/llmr/geometry/binpack.hpp @@ -56,15 +56,15 @@ public: // +--+---+ // |__|___| <-- b1 // +------+ <-- b2 - if (rect.w > width) free.emplace_back({ rect.x + width, rect.y, rect.w - width, height }); - if (rect.h > height) free.emplace_back({ rect.x, rect.y + height, rect.w, rect.h - height }); + if (rect.w > width) free.emplace_back(rect.x + width, rect.y, rect.w - width, height); + if (rect.h > height) free.emplace_back(rect.x, rect.y + height, rect.w, rect.h - height); } else { // split vertically // +--+---+ // |__| | <-- b1 // +--|---+ <-- b2 - if (rect.w > width) free.emplace_back({ rect.x + width, rect.y, rect.w - width, rect.h }); - if (rect.h > height) free.emplace_back({ rect.x, rect.y + height, width, rect.h - height }); + if (rect.w > width) free.emplace_back(rect.x + width, rect.y, rect.w - width, rect.h); + if (rect.h > height) free.emplace_back(rect.x, rect.y + height, width, rect.h - height); } return { rect.x, rect.y, width, height };