MCPcopy Create free account
hub / github.com/adventuregamestudio/ags / Push

Method Push

Engine/script/scriptexecutor.cpp:136–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 inline size_t GetSize() const { return _entries.data() + _entries.size() - _head; }
135
136 inline void Push(const RuntimeScriptValue &value)
137 {
138 if (_head == _entries.data())
139 {
140 std::vector<RuntimeScriptValue> expansion(_entries.size() * 2);
141 std::copy(_entries.begin(), _entries.begin() + _entries.size(), expansion.begin() + _entries.size());
142 _entries = std::move(expansion);
143 _head = _entries.data() + _entries.size() / 2;
144 }
145 *(--_head) = value;
146 }
147
148 inline void PopCount(size_t count)
149 {

Callers 6

RunMethod · 0.45
PushLocationMethod · 0.45
PreProcessLineMethod · 0.45
PreProcessDirectiveMethod · 0.45
StartNewScopeMethod · 0.45

Calls 2

sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected