]> git.seodisparate.com - UDPConnection/commitdiff
Minor fixes
authorStephen Seo <seo.disparate@gmail.com>
Fri, 30 Aug 2019 05:57:24 +0000 (14:57 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 30 Aug 2019 05:57:24 +0000 (14:57 +0900)
cpp_impl/src/UDPC_Defines.hpp
cpp_impl/src/UDPConnection.cpp

index d82436c00962cd237ce805a46e3e664bf80a01e4..b1bf735dcf0de7cf643034a733999e4e5ef98789 100644 (file)
@@ -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<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;
@@ -204,14 +205,14 @@ private:
         }
 
         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;
@@ -240,7 +241,7 @@ private:
             break;
         }
         log_impl_next(type, args...);
-    }
+    } // }}}
 
 public:
     uint_fast32_t _contextIdentifier;
index cf08d45b40857ac2a8b1237adbc223c64182335a..c522ed06c0af84e0ed40072d438422b994e68c2a 100644 (file)
@@ -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<UDPC_LoggingType>(0);
+        return UDPC_LoggingType::SILENT;
     }
     return static_cast<UDPC_LoggingType>(c->loggingType.exchange(loggingType));
 }