Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
remove some of th more verbose debug messages
[staging/windowmanager.git]
/
src
/
util.hpp
diff --git
a/src/util.hpp
b/src/util.hpp
index
94838c0
..
e285c0f
100644
(file)
--- a/
src/util.hpp
+++ b/
src/util.hpp
@@
-3,10
+3,10
@@
#include <functional>
#include <sys/poll.h>
#include <functional>
#include <sys/poll.h>
+
#include <vector>
extern "C" {
#include <vector>
extern "C" {
-#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
};
#include <afb/afb-binding.h>
};
@@
-33,6
+33,18
@@
extern "C" {
#define logdebug(...)
#endif
#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
+
+
// _ _ _ __ _
// ___| |_ _ __ _ _ ___| |_ _ _ _ __ (_) __ _ _ _ ___ / _| __| |
// / __| __| '__| | | |/ __| __| | | | | '_ \| |/ _` | | | |/ _ \ | |_ / _` |
// _ _ _ __ _
// ___| |_ _ __ _ _ ___| |_ _ _ _ __ (_) __ _ _ _ ___ / _| __| |
// / __| __| '__| | | |/ __| __| | | | | '_ \| |/ _` | | | |/ _ \ | |_ / _` |