MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Peek

Method Peek

src/script/api/script_priorityqueue.cpp:69–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69SQInteger ScriptPriorityQueue::Peek(HSQUIRRELVM vm)
70{
71 if (this->IsEmpty()) {
72 ScriptObject::SetLastError(ScriptError::ERR_PRECONDITION_FAILED);
73 sq_pushnull(vm);
74 return 1;
75 }
76
77 return SQConvert::Return<HSQOBJECT>::Set(vm, this->queue.front().second);
78}
79
80SQInteger ScriptPriorityQueue::Exists(HSQUIRRELVM vm)
81{

Callers

nothing calls this directly

Calls 2

IsEmptyMethod · 0.95
sq_pushnullFunction · 0.85

Tested by

no test coverage detected