MCPcopy Create free account
hub / github.com/christophhart/HISE / removeIfEqual

Method removeIfEqual

hi_scripting/scripting/api/ScriptingApiObjects.cpp:6544–6563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6542}
6543
6544bool ScriptingObjects::ScriptUnorderedStack::removeIfEqual(var holder)
6545{
6546 if (!isEventStack)
6547 {
6548 reportScriptError("removeIfEqual does not work with float number stack");
6549 RETURN_IF_NO_THROW(false);
6550 }
6551
6552 auto idx = getIndexForEvent(holder);
6553
6554 if (idx != -1)
6555 {
6556 auto eventFromStack = eventData[idx];
6557 eventData.removeElement(idx);
6558 dynamic_cast<ScriptingMessageHolder*>(holder.getObject())->setMessage(eventFromStack);
6559 return true;
6560 }
6561
6562 return false;
6563}
6564
6565bool ScriptingObjects::ScriptUnorderedStack::insert(var value)
6566{

Callers

nothing calls this directly

Calls 3

removeElementMethod · 0.45
setMessageMethod · 0.45
getObjectMethod · 0.45

Tested by

no test coverage detected