MCPcopy Create free account
hub / github.com/EasyRPG/Player / Push

Method Push

src/scene.cpp:260–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void Scene::Push(std::shared_ptr<Scene> const& new_scene, bool pop_stack_top) {
261 if (pop_stack_top) {
262 old_instances.push_back(instances.back());
263 instances.pop_back();
264 }
265
266 instances.push_back(new_scene);
267 instance = new_scene;
268
269 push_pop_operation = ScenePushed;
270
271 DEBUG_VALIDATE("Push");
272}
273
274std::shared_ptr<Scene> Scene::Peek() {
275 if (instances.size() == 1)

Calls

no outgoing calls

Tested by

no test coverage detected