diff options
author | crupest <crupest@outlook.com> | 2019-12-13 23:53:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-12-13 23:53:06 +0800 |
commit | 221c62de313ad811ca2b3ae8ba43996c96c347bc (patch) | |
tree | 57419e033536e4a9aec0b3ecd26274120352a6f2 /src/ui/layout_control.cpp | |
parent | f452d4826ad4023c28d6dd59686b3cf5d6340235 (diff) | |
download | cru-221c62de313ad811ca2b3ae8ba43996c96c347bc.tar.gz cru-221c62de313ad811ca2b3ae8ba43996c96c347bc.tar.bz2 cru-221c62de313ad811ca2b3ae8ba43996c96c347bc.zip |
...
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; |