diff options
Diffstat (limited to 'src/ui/layout_control.cpp')
-rw-r--r-- | src/ui/layout_control.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/layout_control.cpp b/src/ui/layout_control.cpp index cd9587c7..3b4646e5 100644 --- a/src/ui/layout_control.cpp +++ b/src/ui/layout_control.cpp @@ -13,7 +13,9 @@ 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. + position <= + static_cast<int>( + this->children_.size())); // The position is out of range. children_.insert(this->children_.cbegin() + position, control); @@ -25,7 +27,9 @@ void LayoutControl::AddChild(Control* control, const int position) { void LayoutControl::RemoveChild(const int position) { assert(position >= 0 && - position < this->children_.size()); // The position is out of range. + position < + static_cast<int>( + this->children_.size())); // The position is out of range. const auto i = children_.cbegin() + position; const auto child = *i; |