From 221c62de313ad811ca2b3ae8ba43996c96c347bc Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 13 Dec 2019 23:53:06 +0800 Subject: ... --- src/ui/layout_control.cpp | 8 ++++++-- 1 file changed, 6 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 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(control)); // Can't add a window as child. assert(position >= 0 || - position <= this->children_.size()); // The position is out of range. + position <= + static_cast( + 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( + this->children_.size())); // The position is out of range. const auto i = children_.cbegin() + position; const auto child = *i; -- cgit v1.2.3