| 6542 | } |
| 6543 | |
| 6544 | bool 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 | |
| 6565 | bool ScriptingObjects::ScriptUnorderedStack::insert(var value) |
| 6566 | { |
nothing calls this directly
no test coverage detected