From 86b14c7e3cd8f7c9a9fd3f527e05e0a19c99d1d0 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 1 Sep 2013 23:40:08 +0200 Subject: [PATCH] Fixed compile error in release mode. --- src/Pathfinder.cpp | 4 ++-- src/generator/Generator.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Pathfinder.cpp b/src/Pathfinder.cpp index 76a462a..ddd0a6d 100644 --- a/src/Pathfinder.cpp +++ b/src/Pathfinder.cpp @@ -230,14 +230,14 @@ Pathfinder::getArea(const Vector2f& point) const { /** * Draws areas. */ -#ifndef RELEASE void Pathfinder::draw(sf::RenderTarget& target, sf::RenderStates states) const { +#ifndef RELEASE for (auto& area : mAreas) { sf::RectangleShape rect(Vector2f(area.area.width, area.area.height)); rect.setPosition(Vector2f(area.area.left, area.area.top)); rect.setFillColor(sf::Color(area.area.width * 30, 127, 0, 96)); target.draw(rect); } -} #endif /* RELEASE */ +} diff --git a/src/generator/Generator.cpp b/src/generator/Generator.cpp index 9e271da..659f319 100644 --- a/src/generator/Generator.cpp +++ b/src/generator/Generator.cpp @@ -355,9 +355,9 @@ Generator::findClosestFloor(const Vector2i& start) const { * * mPaths is only required for this function. */ -#ifndef RELEASE void Generator::draw(sf::RenderTarget& target, sf::RenderStates states) const { +#ifndef RELEASE for (auto& p : mPaths) { for (auto&q : p) { sf::RectangleShape rect(Vector2f(Tile::TILE_SIZE)); @@ -366,5 +366,5 @@ Generator::draw(sf::RenderTarget& target, sf::RenderStates states) const { target.draw(rect); } } -} #endif /* RELEASE */ +}