diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-27 13:17:31 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-27 13:17:31 +0000 |
commit | babef2ec1d88b6057b0e17bf1c04dfa3c9d0d5a0 (patch) | |
tree | 89c9f65138b500198061954fcf918ca82a11a5ea /src/common | |
parent | 8a4aa60b830467d81f8029c194bec5b2e74ceb17 (diff) |
conditional -DDEBUG messages
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/console.h | 5 | ||||
-rw-r--r-- | src/common/file.cc | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/common/console.h b/src/common/console.h index 609c99a..5f80e73 100644 --- a/src/common/console.h +++ b/src/common/console.h @@ -14,8 +14,13 @@ #define conmesg common::Console::instance->message() /// global define to send a warning message to the system console #define conwarn common::Console::instance->warning() + +#ifdef DEBUG /// global define to send a debug message to the system console #define condebug common::Console::instance->debug() +#else +#define condebug if (0) *(std::ostream*)(0) +#endif // DEBUG namespace common { diff --git a/src/common/file.cc b/src/common/file.cc index d7603c3..822c678 100644 --- a/src/common/file.cc +++ b/src/common/file.cc @@ -57,7 +57,6 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(filename); std::ifstream::open(fn.c_str(), mode); - // FIXME console if (!this->is_open()) { condebug << "File could not open " << filename << std::endl; } else { |