X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Futil.hpp;h=e285c0f23d6848619c21a571dbd26a80d83f9675;hb=397ad714d8a0ddc3f0b9d5cbcbd68aec9cbe55d0;hp=94838c002837b7b00a937593fd0802c98ebca7f0;hpb=d45f8674ced71594fa9ba99900cc87a19fcecb20;p=staging%2Fwindowmanager.git diff --git a/src/util.hpp b/src/util.hpp index 94838c0..e285c0f 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -3,10 +3,10 @@ #include #include + #include extern "C" { -#define AFB_BINDING_VERSION 2 #include }; @@ -33,6 +33,18 @@ extern "C" { #define logdebug(...) #endif +#ifndef NDEBUG +#define DB(expr) \ + do { \ + std::ostringstream o; \ + o << __FILE__ << ":" << __LINE__ << ":" << __func__ << ": " << expr; \ + logdebug("%s", o.str().c_str()); \ + } while (0) +#else +#define DB(expr) +#endif + + // _ _ _ __ _ // ___| |_ _ __ _ _ ___| |_ _ _ _ __ (_) __ _ _ _ ___ / _| __| | // / __| __| '__| | | |/ __| __| | | | | '_ \| |/ _` | | | |/ _ \ | |_ / _` |