From 8da9b3e54ae8bf3168a1ef4a44b2c1d24c1d8099 Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Sat, 2 Jul 2011 17:30:26 +0400 Subject: [PATCH] Remove some qDebug code warnings --- src/common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common.h b/src/common.h index ceb62fb..9774acf 100644 --- a/src/common.h +++ b/src/common.h @@ -29,9 +29,10 @@ inline const QString& _valueOf(const QString& x) { return x; } inline const QString _valueOf(size_t x) { return QString::number((uint)x); } // some debug macros -#define dbg(x) qDebug(#x " is <%s>", _valueOf(x).toLatin1().constData()) -#define dbs(x) qDebug(_valueOf(x).toLatin1().constData()) -#define dbp(s, x) qDebug(QString(s).arg(_valueOf(x)).toLatin1().constData()) +#define constlatin(x) (_valueOf(x).toLatin1().constData()) +#define dbg(x) qDebug(#x " is <%s>", constlatin(x)) +#define dbs(x) qDebug(constlatin(x), "") +#define dbp(s, x) qDebug(constlatin(s), constlatin(x)) #define db1 qDebug("Mark Nr. 1") #define db2 qDebug("Mark Nr. 2") #define db3 qDebug("Mark Nr. 3") -- 2.11.4.GIT