diff --git a/cpp_impl/src/UDPC_Defines.hpp b/cpp_impl/src/UDPC_Defines.hpp index d82436c..b1bf735 100644 --- a/cpp_impl/src/UDPC_Defines.hpp +++ b/cpp_impl/src/UDPC_Defines.hpp @@ -1,3 +1,4 @@ +// vim: foldmethod=marker #ifndef UDPC_DEFINES_HPP #define UDPC_DEFINES_HPP @@ -143,7 +144,7 @@ private: void log_impl(UDPC_LoggingType) {} template - void log_impl(UDPC_LoggingType type, Targs... args) { + void log_impl(UDPC_LoggingType type, Targs... args) { // {{{ switch(loggingType.load()) { case UDPC_LoggingType::SILENT: return; @@ -204,14 +205,14 @@ private: } log_impl_next(type, args...); - } + } // }}} void log_impl_next(UDPC_LoggingType) { std::cerr << '\n'; } template - 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; @@ -240,7 +241,7 @@ private: break; } log_impl_next(type, args...); - } + } // }}} public: uint_fast32_t _contextIdentifier; diff --git a/cpp_impl/src/UDPConnection.cpp b/cpp_impl/src/UDPConnection.cpp index cf08d45..c522ed0 100644 --- a/cpp_impl/src/UDPConnection.cpp +++ b/cpp_impl/src/UDPConnection.cpp @@ -1010,7 +1010,7 @@ uint32_t UDPC_set_protocol_id(UDPC_HContext ctx, uint32_t id) { UDPC_LoggingType set_logging_type(UDPC_HContext ctx, UDPC_LoggingType loggingType) { UDPC::Context *c = UDPC::verifyContext(ctx); if(!c) { - return static_cast(0); + return UDPC_LoggingType::SILENT; } return static_cast(c->loggingType.exchange(loggingType)); }