MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / InsertChild

Method InsertChild

App/Client/Favorite/FavoriteModel.cpp:569–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567}
568
569bool CFavoriteModel::tree::InsertChild(int index, tree *child)
570{
571 if(0 > index || ChildCount() < index || !child)
572 return false;
573 children.insert(index, child);
574 child->parent = this;
575 // 更新剩余子节点的行号
576 for (int i = index; i < ChildCount(); ++i) {
577 children[i]->SetRow(i);
578 }
579 return true;
580}
581
582bool CFavoriteModel::tree::RemoveChild(tree *child)
583{

Callers 2

AddNodeMethod · 0.80
AddTreeMethod · 0.80

Calls 1

SetRowMethod · 0.80

Tested by

no test coverage detected