fix emplace_back

This commit is contained in:
Konstantin Käfer
2014-02-04 16:19:32 +01:00
parent d7246099c6
commit 66e62eb4c8

View File

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