+// vim: foldmethod=marker
#ifndef UDPC_DEFINES_HPP
#define UDPC_DEFINES_HPP
void log_impl(UDPC_LoggingType) {}
template<typename... Targs>
- void log_impl(UDPC_LoggingType type, Targs... args) {
+ void log_impl(UDPC_LoggingType type, Targs... args) { // {{{
switch(loggingType.load()) {
case UDPC_LoggingType::SILENT:
return;
}
log_impl_next(type, args...);
- }
+ } // }}}
void log_impl_next(UDPC_LoggingType) {
std::cerr << '\n';
}
template<typename T, typename... Targs>
- void log_impl_next(UDPC_LoggingType type, T value, Targs... args) {
+ void log_impl_next(UDPC_LoggingType type, T value, Targs... args) { // {{{
switch(loggingType.load()) {
case UDPC_LoggingType::SILENT:
return;
break;
}
log_impl_next(type, args...);
- }
+ } // }}}
public:
uint_fast32_t _contextIdentifier;
UDPC_LoggingType set_logging_type(UDPC_HContext ctx, UDPC_LoggingType loggingType) {
UDPC::Context *c = UDPC::verifyContext(ctx);
if(!c) {
- return static_cast<UDPC_LoggingType>(0);
+ return UDPC_LoggingType::SILENT;
}
return static_cast<UDPC_LoggingType>(c->loggingType.exchange(loggingType));
}