From 36d59f764601c0ade602899e8be29f896793f6fc Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Fri, 13 Jun 2014 15:32:56 -0400 Subject: [PATCH] put unit_map debug mode compilation on its own define This helps with profiling using callgrind. --- src/unit_map.cpp | 2 +- src/unit_map.hpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/unit_map.cpp b/src/unit_map.cpp index 5c3c5730ddb9..5fe8ce987456 100644 --- a/src/unit_map.cpp +++ b/src/unit_map.cpp @@ -332,7 +332,7 @@ std::vector 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); diff --git a/src/unit_map.hpp b/src/unit_map.hpp index cf1bad14f10f..0ab33789d10a 100644 --- a/src/unit_map.hpp +++ b/src/unit_map.hpp @@ -26,6 +26,8 @@ #include #include +//#define DEBUG_UNIT_MAP + class unit; /** @@ -373,7 +375,7 @@ class unit_map { ///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 ;