Couple of assertions
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
using namespace Dawn;
|
||||
|
||||
UIComponent::UIComponent(UICanvas *canvas) {
|
||||
assertNotNull(canvas);
|
||||
this->canvas = canvas;
|
||||
}
|
||||
|
||||
@ -141,7 +142,7 @@ void UIComponent::addChild(UIComponent *child) {
|
||||
}
|
||||
|
||||
void UIComponent::removeChild(UIComponent *child) {
|
||||
if(child->parent != this) throw "Invalid child";
|
||||
assertTrue(child->parent != this);
|
||||
auto it = this->children.begin();
|
||||
while(it != this->children.end()) {
|
||||
if(*it == child) {
|
||||
|
Reference in New Issue
Block a user