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

Method GetInserIndex

App/Client/Favorite/FavoriteModel.cpp:546–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546int CFavoriteModel::tree::GetInserIndex(tree *child)
547{
548 int index = 0;
549 if(!child) return 0;
550 if(child->IsFavorite()) {
551 index = children.size();
552 } else {
553 foreach (const auto &c, children) {
554 if (c && c->item.isFolder()) {
555 index++;
556 }
557 }
558 }
559 return index;
560}
561
562bool CFavoriteModel::tree::AddChild(tree *child)
563{

Callers 3

AddNodeMethod · 0.80
AddTreeMethod · 0.80
foreachFunction · 0.80

Calls 1

IsFavoriteMethod · 0.80

Tested by

no test coverage detected