Last active
June 22, 2020 01:42
-
-
Save ypujante/9764910dbc8c331f3a9f518768d69a8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <JukeboxTypes.h> | |
/** | |
Replace code like this: | |
TJBox_Value values[] = {noteCVValue, gateCVValue}; | |
JBOX_TRACEVALUES("Note CV ^0 Gate CV ^1 ", values, 2); | |
with | |
JBOX_LOGVALUES("Note CV ^0 Gate CV ^1 ", noteCVValue, gateCVValue); | |
*/ | |
namespace impl { | |
template<typename... Args> | |
inline void JBox_LogValues(const char iFile[], TJBox_Int32 iLine, char const *iMessage, Args&& ...iValues) | |
{ | |
TJBox_Value values[sizeof...(iValues)] { iValues... }; | |
JBox_TraceValues(iFile, iLine, iMessage, values, sizeof...(iValues)); | |
} | |
} | |
#if DEBUG | |
#define JBOX_LOGVALUES(iMessage, ...) \ | |
impl::JBox_LogValues(__FILE__, __LINE__, iMessage, __VA_ARGS__) | |
#else | |
#define JBOX_LOGVALUES(iMessage, ...) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment