Skip to content

Commit

Permalink
Remove TRACE in Release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
asb2m10 committed Sep 23, 2020
1 parent 125ea6d commit dda2e72
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
14 changes: 5 additions & 9 deletions Source/Dexed.h
Expand Up @@ -27,18 +27,14 @@ void dexed_trace(const char *source, const char *fmt, ...);

#ifdef DEBUG
#define DEXED_VERSION DEXED_ID " DEBUG"
#ifndef TRACE
#ifdef _MSC_VER
#define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
#else
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#ifdef _MSC_VER
#define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
#else
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#else
#define DEXED_VERSION DEXED_ID
#ifndef TRACE
#define TRACE(fmt, ...)
#endif
#define TRACE(fmt, ...)
#endif

#endif // DEXED_H_INCLUDED
14 changes: 7 additions & 7 deletions Source/msfa/synth.h
Expand Up @@ -60,12 +60,12 @@ inline static T max(const T& a, const T& b) {
void dexed_trace(const char *source, const char *fmt, ...);

#define QER(n,b) ( ((float)n)/(1<<b) )
#ifndef TRACE
#ifdef _MSC_VER
#define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
#else
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#endif
//#ifndef TRACE
// #ifdef _MSC_VER
// #define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
// #else
// #define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
// #endif
//#endif

#endif // __SYNTH_H

0 comments on commit dda2e72

Please sign in to comment.