From 260bb46ac6dc081775b0c4cc24c50be97d94c3c6 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 21 Jul 2013 11:02:14 +0200 Subject: [PATCH] Added documentation. --- source/generator/Generator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/generator/Generator.cpp b/source/generator/Generator.cpp index 89ab6d1..57efb6b 100644 --- a/source/generator/Generator.cpp +++ b/source/generator/Generator.cpp @@ -259,6 +259,7 @@ Generator::getPlayerSpawn() const { /** * Finds the point array index closest to position which has a floor tile. * + * @warn Will fail if no floor tile has been generated yet. * @position Point to start search for a floor tile from. */ sf::Vector2i @@ -298,6 +299,7 @@ Generator::findClosestFloor(const sf::Vector2i& position) const { open.insert(makePair(sf::Vector2i(current.x, current.y - 1))); } } + // No floor tile found in the entire world. assert(false); return sf::Vector2i(); }