#include <config.h>
#endif
+#if !defined(NDEBUG) || defined(TRACE_IN_RELEASE)
+
#include "tdebug.h"
#include "tstring.h"
#include "tdebuglistener.h"
void debug(const String &s)
{
-#if !defined(NDEBUG) || defined(TRACE_IN_RELEASE)
-
debugListener->printMessage("TagLib: " + s + "\n");
-
-#endif
}
void debugData(const ByteVector &v)
{
-#if !defined(NDEBUG) || defined(TRACE_IN_RELEASE)
-
for(size_t i = 0; i < v.size(); ++i)
{
std::string bits = std::bitset<8>(v[i]).to_string();
debugListener->printMessage(msg);
}
-
-#endif
}
}
+
+#endif
class ByteVector;
#ifndef DO_NOT_DOCUMENT
+#if !defined(NDEBUG) || defined(TRACE_IN_RELEASE)
/*!
- * A simple function that outputs the debug messages to the listener.
- * The default listener redirects the messages to \a stderr when NDEBUG is
+ * A simple function that outputs the debug messages to the listener.
+ * The default listener redirects the messages to \a stderr when NDEBUG is
* not defined.
*
* \warning Do not use this outside of TagLib, it could lead to undefined
* \internal
*/
void debug(const String &s);
-
+
/*!
* For debugging binary data.
*
* \internal
*/
void debugData(const ByteVector &v);
+
+#else
+
+ #define debug(x) ((void)0)
+ #define debugData(x) ((void)0)
+
+#endif
}
#endif