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

Function RemoveFromSet

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

Source from the content-addressed store, hash-verified

266 }
267
268 int RemoveFromSet(IntSet* set, int a) {
269 ListItem* ptr = set->list.head;
270 while (ptr) {
271 if (lua_cast(IntSetItem*, ptr)->value == a) {
272 break;
273 }
274 ptr = ptr->next;
275 }
276 if (ptr == NULL) {
277 return 0;
278 }
279 delete RemoveFromList(&(set->list), ptr);
280 return 1;
281 }
282
283 /*
284 ** VarList Functions

Callers 2

UnsetPendingFunction · 0.85
ProcessCodeFunction · 0.85

Calls 1

RemoveFromListFunction · 0.85

Tested by

no test coverage detected