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

Method prepend

libs/JSystem/JSupport/JSUList.cpp:72–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72bool JSUPtrList::prepend(JSUPtrLink *pLink) {
73 bool validity = (pLink->mPtrList == 0);
74
75 if (!validity) {
76 validity = pLink->mPtrList->remove(pLink);
77 }
78
79 if (validity) {
80 if (!mLinkCount) {
81 setFirst(pLink);
82 }
83 else {
84 pLink->mPtrList = this;
85 pLink->mPrev = 0;
86 pLink->mNext = mHead;
87 mHead->mPrev = pLink;
88 mHead = pLink;
89 mLinkCount = mLinkCount + 1;
90 }
91 }
92
93 return validity;
94}
95
96bool JSUPtrList::insert(JSUPtrLink *pLink_1, JSUPtrLink *pLink_2) {
97 if (pLink_1 == mHead) {

Callers 6

JPAEmitterManagerMethod · 0.45
forceDeleteEmitterMethod · 0.45
JKRDvdArchiveMethod · 0.45
JKRAramArchiveMethod · 0.45
JKRMemArchiveMethod · 0.45
JKRCompArchiveMethod · 0.45

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected