From a410e2048db6f5ef6fb50e401a59b4b98b979050 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 4 Apr 2019 17:12:25 +0800 Subject: ... --- src/ui/layout_control.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui/layout_control.cpp') diff --git a/src/ui/layout_control.cpp b/src/ui/layout_control.cpp index c0c4a7fe..9d789670 100644 --- a/src/ui/layout_control.cpp +++ b/src/ui/layout_control.cpp @@ -1,7 +1,9 @@ -#include "layout_control.hpp" +#include "cru/ui/layout_control.hpp" #include "window.hpp" +#include + namespace cru::ui { LayoutControl::~LayoutControl() { for (const auto child : children_) delete child; @@ -10,7 +12,8 @@ LayoutControl::~LayoutControl() { void LayoutControl::AddChild(Control* control, const int position) { assert(control->GetParent() == nullptr); // The control already has a parent. assert(!dynamic_cast(control)); // Can't add a window as child. - assert(position >= 0 || position <= this->children_.size()); // The position is out of range. + assert(position >= 0 || + position <= this->children_.size()); // The position is out of range. children_.insert(this->children_.cbegin() + position, control); -- cgit v1.2.3