MCPcopy Create free account
hub / github.com/SmingHub/Sming / remove

Method remove

Sming/Core/Data/LinkedObjectList.cpp:39–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool LinkedObjectList::remove(LinkedObject* object)
40{
41 if(object == nullptr || mHead == nullptr) {
42 return false;
43 }
44
45 if(mHead == object) {
46 mHead = object->mNext;
47 return true;
48 }
49
50 auto it = mHead;
51 while(it->mNext != nullptr) {
52 if(it->mNext == object) {
53 it->mNext = object->mNext;
54 object->mNext = nullptr;
55 return true;
56 }
57 it = it->mNext;
58 }
59
60 return false;
61}

Callers 3

fileDeleteFunction · 0.45
unQuoteMethod · 0.45
getMimeTypeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected