diff --git a/include/debugmacro.h b/include/debugmacro.h index d91244a..1365fba 100644 --- a/include/debugmacro.h +++ b/include/debugmacro.h @@ -1,9 +1,12 @@ #pragma once +#include + +#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #ifdef _DEBUG #define DEBUG_MSG(str) \ do { std::cerr \ - << __FILE__ <<":" << __LINE__ << ":" << __func__ << "(): " \ + << __FILENAME__ <<":" << __LINE__ << ":" << __func__ << "(): " \ << str << std::endl; } while( false ) #else #define DEBUG_MSG(str) do { } while ( false )