summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 12:55:32 +0000
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 12:55:32 +0000
commit5efaa5125fe92a5438b3cc2949f4d720bced5a7a (patch)
tree87f4da1382fb6179610182ca3e502e5365e66276 /src/map.cpp
parent2e60491ceb0548b0bea93207c13b974d6a6cf5cc (diff)
downloadmana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.tar.gz
mana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.tar.bz2
mana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.tar.xz
mana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.zip
General code cleanups
* Don't needlessly store or return raw pointers in BeingInfo * Less copying, more moving * Less else after return * Make AddDEF a template instead of a macro * Removed some unused includes * Use range-based for loops
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 9639ddf2..76f6b56b 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -387,7 +387,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY)
{
// We draw beings with a lower opacity to make them visible
// even when covered by a wall or some other elements...
- Actors::const_iterator ai = mActors.begin();
+ auto ai = mActors.begin();
while (ai != mActors.end())
{
if (Actor *actor = *ai)
@@ -505,7 +505,7 @@ void Map::updateAmbientLayers(float scrollX, float scrollY)
}
void Map::drawAmbientLayers(Graphics *graphics, LayerType type,
- float scrollX, float scrollY, int detail)
+ float scrollX, float scrollY, int detail)
{
// Detail 0 = no ambient effects except background image
if (detail <= 0 && type != BACKGROUND_LAYERS) return;
@@ -524,7 +524,7 @@ void Map::drawAmbientLayers(Graphics *graphics, LayerType type,
// New type of ambient layers added here without adding it
// to Map::drawAmbientLayers.
assert(false);
- break;
+ return;
}
// Draw overlays