aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/cpp/Map.cpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-17 22:08:18 +0100
committerNao Pross <naopross@thearcway.org>2018-02-17 22:08:18 +0100
commit7ec2e0fbd6c53faa52ca0e6f2e8e172d3556c81d (patch)
tree3ce33e8d1b83e3adf9b7998fbfc206014e9250e7 /src/main/cpp/Map.cpp
parentAdd all warning and thread them as errors (diff)
downloadSubconscious-old-7ec2e0fbd6c53faa52ca0e6f2e8e172d3556c81d.tar.gz
Subconscious-old-7ec2e0fbd6c53faa52ca0e6f2e8e172d3556c81d.zip
Fix all warnings (errors with -Werror)
Diffstat (limited to '')
-rw-r--r--src/main/cpp/Map.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/cpp/Map.cpp b/src/main/cpp/Map.cpp
index 3cb1b9d..d192b3b 100644
--- a/src/main/cpp/Map.cpp
+++ b/src/main/cpp/Map.cpp
@@ -24,6 +24,11 @@ const std::vector<Tile>& Map::tiles() const
bool Map::moveActor(Tile &from, Tile &to)
{
+ if (to.actor() != nullptr)
+ return false;
+
to.actor(from.actor());
from.clearActor();
+
+ return true;
}