MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / removeChild

Method removeChild

src/GuiComponent.cpp:100–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void GuiComponent::removeChild(GuiComponent* cmp)
101{
102 if(cmp->getParent() != this)
103 {
104 LOG(LogError) << "Tried to remove child from incorrect parent!";
105 }
106
107 cmp->setParent(NULL);
108
109 for(auto i = mChildren.begin(); i != mChildren.end(); i++)
110 {
111 if(*i == cmp)
112 {
113 mChildren.erase(i);
114 return;
115 }
116 }
117}
118
119void GuiComponent::clearChildren()
120{

Callers 2

~GuiComponentMethod · 0.80
addChildMethod · 0.80

Calls 4

getParentMethod · 0.80
setParentMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected