MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / ClearList

Function ClearList

src/Chain/libraries/glua/glua_structs.cpp:81–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void ClearList(List* list, ListItemFn fn) {
82 ListItem* walk = list->head;
83
84 while (walk) {
85 ListItem* save = walk;
86 walk = walk->next;
87 if (fn) {
88 fn(save, NULL);
89 }
90 delete save;
91 }
92
93 list->head = NULL;
94 list->tail = NULL;
95 list->size = 0;
96 }
97
98 ListItem* FindFromListHead(List* list, ListItemCmpFn cmp, const void* sample) {
99 ListItem* walk = list->head;

Callers 5

ClearAstStatementFunction · 0.85
DeleteIntSetFunction · 0.85
DeleteTableFunction · 0.85
DeleteFunctionFunction · 0.85
OutputAssignmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected