MCPcopy Create free account
hub / github.com/doldecomp/mkdd / remove

Method remove

libs/JSystem/JSupport/JSUList.cpp:128–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128bool JSUPtrList::remove(JSUPtrLink *pLink) {
129 bool isSameList = (pLink->mPtrList == this);
130
131 if (isSameList) {
132 if (mLinkCount == 1) {
133 mHead = 0;
134 mTail = 0;
135 }
136 else if (pLink == mHead) {
137 pLink->mNext->mPrev = 0;
138 mHead = pLink->mNext;
139 }
140 else if (pLink == mTail) {
141 pLink->mPrev->mNext = 0;
142 mTail = pLink->mPrev;
143 }
144 else {
145 pLink->mPrev->mNext = pLink->mNext;
146 pLink->mNext->mPrev = pLink->mPrev;
147 }
148
149 pLink->mPtrList = 0;
150 mLinkCount--;
151 }
152
153 return isSameList;
154}
155
156JSUPtrLink *JSUPtrList::getNthLink(u32 n) const
157{

Callers 15

load_build_configFunction · 0.45
removeLightMethod · 0.45
~LightMgrMethod · 0.45
removePageMethod · 0.45
loadMethod · 0.45
resetListsMethod · 0.45
removeItemMethod · 0.45
deleteItemByMoveListMethod · 0.45
removeMiniGameListMethod · 0.45
~JSUPtrLinkMethod · 0.45
appendMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected