29 lines
897 B
C++
29 lines
897 B
C++
#pragma once
|
|
|
|
#if defined (QT_DEBUG) || defined (DEBUG) || defined (_DEBUG)
|
|
|
|
template<size_t Y, typename T>
|
|
std::bitset<Y> varToBitset(T info) {
|
|
std::bitset<Y> content(info);
|
|
return content;
|
|
}
|
|
|
|
#define log_debugcpp(str) do { \
|
|
std::cout << "[DEBUG]" << "(" << __FILE__ << ":" << __LINE__ << "): " << str << std::endl; \
|
|
} while (0)
|
|
|
|
#define print_as_binary(len, type, info) varToBitset<len, type>(info)
|
|
|
|
#else
|
|
#define log_debugcpp(str)
|
|
#define print_as_binary(len, type, info)
|
|
#endif
|
|
|
|
/* Here as a quick reference, in case smthn similar is needed again */
|
|
/* typedef void (EndpointWidget::*epwMuteFunc)(bool muted); */
|
|
/* typedef void (EndpointWidget::*epwMainVolumeFunc)(float newValue); */
|
|
/* typedef void (EndpointWidget::*epwChannelVolumeFunc)(uint32_t channel, float newValue); */
|
|
/* typedef void (EndpointWidget::*epwToggleFrontFunc)(bool active); */
|
|
|
|
|
|
|