put unit_map debug mode compilation on its own define

This helps with profiling using callgrind.
This commit is contained in:
Chris Beck 2014-06-13 15:32:56 -04:00
parent d7c2675c58
commit 36d59f7646
2 changed files with 4 additions and 2 deletions

View File

@ -332,7 +332,7 @@ std::vector<unit_map::const_unit_iterator> unit_map::find_leaders(int side)const
return const_leaders;
}
#ifdef DEBUG
#ifdef DEBUG_UNIT_MAP
bool unit_map::self_check() const {
bool good(true);

View File

@ -26,6 +26,8 @@
#include <map>
#include <boost/unordered_map.hpp>
//#define DEBUG_UNIT_MAP
class unit;
/**
@ -373,7 +375,7 @@ public:
///Checks invariants. For debugging purposes only. Doesn't do anything in non-debug mode.
bool self_check() const
#ifndef DEBUG
#ifndef DEBUG_UNIT_MAP
{ return true; }
#else
;