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 };