diff options
Diffstat (limited to 'src/ui/render/render_object.cpp')
-rw-r--r-- | src/ui/render/render_object.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/render/render_object.cpp b/src/ui/render/render_object.cpp index b6a9e8e4..7f6255f7 100644 --- a/src/ui/render/render_object.cpp +++ b/src/ui/render/render_object.cpp @@ -11,9 +11,10 @@ void RenderObject::AddChild(RenderObject* render_object, const int position) { assert(!(child_mode_ == ChildMode::Single && children_.size() > 0)); assert(render_object->GetParent() == - nullptr); // Render object already has a parent. - assert(position >= 0); // Position index is less than 0. - assert(position <= children_.size()); // Position index is out of bound. + nullptr); // Render object already has a parent. + assert(position >= 0); // Position index is less than 0. + assert(position <= static_cast<int>( + children_.size())); // Position index is out of bound. children_.insert(children_.cbegin() + position, render_object); render_object->SetParent(this); @@ -21,8 +22,9 @@ void RenderObject::AddChild(RenderObject* render_object, const int position) { } void RenderObject::RemoveChild(const int position) { - assert(position >= 0); // Position index is less than 0. - assert(position < children_.size()); // Position index is out of bound. + assert(position >= 0); // Position index is less than 0. + assert(position < static_cast<int>( + children_.size())); // Position index is out of bound. const auto i = children_.cbegin() + position; const auto removed_child = *i; |