Code Review
/
ric-plt
/
xapp-frame-cpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Correct sonar bugs and address smells
[ric-plt/xapp-frame-cpp.git]
/
src
/
config
/
config_cb.cpp
diff --git
a/src/config/config_cb.cpp
b/src/config/config_cb.cpp
index
309ddba
..
9fd417b
100644
(file)
--- a/
src/config/config_cb.cpp
+++ b/
src/config/config_cb.cpp
@@
-37,9
+37,9
@@
namespace xapp {
/*
Builder.
*/
/*
Builder.
*/
-Config_cb::Config_cb( notify_callback ufun, void* udata ) :
+Config_cb::Config_cb( notify_callback ufun, void* u
ser_
data ) :
user_fun( ufun ),
user_fun( ufun ),
- udata( udata )
+ udata( u
ser_
data )
{ /* empty body */ }
{ /* empty body */ }
@@
-50,13
+50,14
@@
Config_cb::Config_cb( notify_callback ufun, void* udata ) :
/*
Drive_cb will invoke the callback and pass along the stuff passed here.
/*
Drive_cb will invoke the callback and pass along the stuff passed here.
+ User_data may be nil which causes the data registered with the callback
+ to be used.
*/
*/
-void xapp::Config_cb::Drive_cb( xapp::Config& c, void* u
data )
{
+void xapp::Config_cb::Drive_cb( xapp::Config& c, void* u
ser_data ) const
{
if( user_fun != NULL ) {
if( user_fun != NULL ) {
- user_fun( c, udata );
+ user_fun( c, u
ser_data == NULL ? udata : user_
data );
}
}
}
}
-
} // namespace
} // namespace