[Ika-commits] SF.net SVN: ika:[736] trunk/common
Status: Beta
Brought to you by:
the_speed_bump
From: <slu...@us...> - 2010-09-23 19:56:15
|
Revision: 736 http://ika.svn.sourceforge.net/ika/?rev=736&view=rev Author: sluimers Date: 2010-09-23 19:56:09 +0000 (Thu, 23 Sep 2010) Log Message: ----------- edited debugging file Modified Paths: -------------- trunk/common/debug.cpp trunk/common/debug.h Modified: trunk/common/debug.cpp =================================================================== --- trunk/common/debug.cpp 2010-09-23 17:52:55 UTC (rev 735) +++ trunk/common/debug.cpp 2010-09-23 19:56:09 UTC (rev 736) @@ -1,7 +1,7 @@ #include "debug.h" -string int2string(const int& number) { - ostringstream oss; +std::string int2string(const int& number) { + std::ostringstream oss; oss << number; return oss.str(); } Modified: trunk/common/debug.h =================================================================== --- trunk/common/debug.h 2010-09-23 17:52:55 UTC (rev 735) +++ trunk/common/debug.h 2010-09-23 19:56:09 UTC (rev 736) @@ -1,4 +1,4 @@ -#define DEBUG +//#define DEBUG #ifndef DEBUG_H #define DEBUG_H @@ -6,20 +6,21 @@ #include <iostream> #include <string> #include <sstream> -using namespace std; #ifdef DEBUG +std::string int2string(const int& number); + /* just a helper for code location */ -#define PyDEBUGSTR (string("print('debug: ") + __FILE__ + ":" + int2string(__LINE__) + "')").c_str() -#define LOC cout << "debug:" << __FILE__ << ":" << __LINE__ << " "; +#define PyDEBUGSTR (std::string("print('debug: ") + __FILE__ + ":" + int2string(__LINE__) + "')").c_str() +#define LOC std::cout << "debug:" << __FILE__ << ":" << __LINE__ << " "; #define PyLOC PyRun_SimpleString(PyDEBUGSTR); /* macro for general debug print statements. */ -#define DEBUG_PRINT(text) LOC cout << text << endl; +#define DEBUG_PRINT(text) LOC std::cout << text << endl; /* macro that prints a variable name and its actual value */ -#define DEBUG_VAR(text) LOC cout << (#text) << "=" << text << endl; +#define DEBUG_VAR(text) LOC std::cout << (#text) << "=" << text << endl; /* python macro that prints a variable name and its actual value */ #define DEBUG_PyRUN(text) PyLOC PyRun_SimpleString(text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |