diff options
Diffstat (limited to 'src/ui/layout_control.cpp')
-rw-r--r-- | src/ui/layout_control.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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 <cassert> + 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<Window*>(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); |