RIC-641 Fixing client/server model definitions and adding client and server API
[ric-plt/xapp-frame-cpp.git] / src / messaging / msg_component.hpp
index d707257..95e445c 100644 (file)
@@ -35,6 +35,8 @@
 
 #include <memory>
 
+namespace xapp {
+
 //  -------------- smart pointer support  --------------------------------
 /*
        Pointers to a lot of things in the RMR message aren't directly
@@ -45,7 +47,7 @@
        such a smart pointer, and does _nothing_ when called.
 */
 typedef struct {
-       void operator()( unsigned char * p ){}
+       void operator()( unsigned char * p ) const { /* empty to prevent free */ }
 } unfreeable;
 
 /*
@@ -54,4 +56,6 @@ typedef struct {
 */
 using Msg_component = std::unique_ptr<unsigned char, unfreeable>;
 
+
+} // namespace
 #endif