MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / clearMapLights

Method clearMapLights

source/gamemap/GameMap.cpp:2012–2023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2010}
2011
2012void GameMap::clearMapLights()
2013{
2014 // We need to work on a copy of mMapLights because removeFromGameMap will remove them from this vector
2015 std::vector<MapLight*> mapLights = mMapLights;
2016 for (MapLight* mapLight : mapLights)
2017 {
2018 mapLight->removeFromGameMap();
2019 mapLight->deleteYourself();
2020 }
2021
2022 mMapLights.clear();
2023}
2024
2025void GameMap::addMapLight(MapLight *m)
2026{

Callers

nothing calls this directly

Calls 3

deleteYourselfMethod · 0.80
clearMethod · 0.80
removeFromGameMapMethod · 0.45

Tested by

no test coverage detected