Allow to disable logging by #defining "RELEASE".
This commit is contained in:
parent
bf87454682
commit
7644ca2db0
3 changed files with 13 additions and 2 deletions
|
@ -232,7 +232,7 @@ Pathfinder::getArea(const Vector2f& point) const {
|
|||
/**
|
||||
* Draws areas.
|
||||
*/
|
||||
#ifndef NDEBUG
|
||||
#ifndef RELEASE
|
||||
void
|
||||
Pathfinder::draw(sf::RenderTarget& target, sf::RenderStates states) const {
|
||||
for (auto& area : mAreas) {
|
||||
|
|
|
@ -361,7 +361,7 @@ Generator::findClosestFloor(const Vector2i& start) const {
|
|||
return Vector2i();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#ifndef RELEASE
|
||||
/**
|
||||
* Debug only: Draws paths generated by connectRooms.
|
||||
*
|
||||
|
|
|
@ -13,6 +13,15 @@
|
|||
#include <SFML/System/Vector2.hpp>
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
|
||||
#ifdef RELEASE
|
||||
|
||||
#define LOG_E(str)
|
||||
#define LOG_W(str)
|
||||
#define LOG_D(str)
|
||||
#define LOG_I(str)
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* Logging functions for different levels.
|
||||
*
|
||||
|
@ -84,4 +93,6 @@ operator<<(std::ostream& os, const sf::IntRect& rect) {
|
|||
return os;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* DG_LOG_H_ */
|
||||
|
|
Reference in a new issue