MCPcopy Create free account
hub / github.com/cpputest/cpputest / removeNode

Method removeNode

src/CppUTest/MemoryLeakDetector.cpp:308–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308MemoryLeakDetectorNode* MemoryLeakDetectorList::removeNode(char* memory)
309{
310 MemoryLeakDetectorNode* cur = head_;
311 MemoryLeakDetectorNode* prev = NULLPTR;
312 while (cur) {
313 if (cur->memory_ == memory) {
314 if (prev) {
315 prev->next_ = cur->next_;
316 return cur;
317 }
318 else {
319 head_ = cur->next_;
320 return cur;
321 }
322 }
323 prev = cur;
324 cur = cur->next_;
325 }
326 return NULLPTR;
327}
328
329MemoryLeakDetectorNode* MemoryLeakDetectorList::retrieveNode(char* memory)
330{

Calls

no outgoing calls

Tested by

no test coverage detected