-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Adapted c-api of monitoring in the way to remain c-return value compliant #1862
Conversation
…moved obsolete ecal_clang functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -32,23 +32,23 @@ extern "C" | |||
{ | |||
ECALC_API int eCAL_Monitoring_SetExclFilter(const char* filter_) | |||
{ | |||
return(eCAL::Monitoring::SetExclFilter(std::string(filter_))); | |||
return(!eCAL::Monitoring::SetExclFilter(std::string(filter_))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
return(!eCAL::Monitoring::SetExclFilter(std::string(filter_))); | |
returnstatic_cast<int>(!eCAL::Monitoring::SetExclFilter(std::string(filter_))); |
@@ -32,23 +32,23 @@ | |||
{ | |||
ECALC_API int eCAL_Monitoring_SetExclFilter(const char* filter_) | |||
{ | |||
return(eCAL::Monitoring::SetExclFilter(std::string(filter_))); | |||
return(!eCAL::Monitoring::SetExclFilter(std::string(filter_))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::SetExclFilter" is directly included [misc-include-cleaner]
ecal/core/src/cimpl/ecal_monitoring_cimpl.cpp:27:
- #include "ecal_common_cimpl.h"
+ #include "ecal/ecal_monitoring.h"
+ #include "ecal_common_cimpl.h"
@@ -32,23 +32,23 @@ | |||
{ | |||
ECALC_API int eCAL_Monitoring_SetExclFilter(const char* filter_) | |||
{ | |||
return(eCAL::Monitoring::SetExclFilter(std::string(filter_))); | |||
return(!eCAL::Monitoring::SetExclFilter(std::string(filter_))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::string" is directly included [misc-include-cleaner]
ecal/core/src/cimpl/ecal_monitoring_cimpl.cpp:26:
+ #include <string>
} | ||
|
||
ECALC_API int eCAL_Monitoring_SetInclFilter(const char* filter_) | ||
{ | ||
return(eCAL::Monitoring::SetInclFilter(std::string(filter_))); | ||
return(!eCAL::Monitoring::SetInclFilter(std::string(filter_))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
return(!eCAL::Monitoring::SetInclFilter(std::string(filter_))); | |
returnstatic_cast<int>(!eCAL::Monitoring::SetInclFilter(std::string(filter_))); |
} | ||
|
||
ECALC_API int eCAL_Monitoring_SetInclFilter(const char* filter_) | ||
{ | ||
return(eCAL::Monitoring::SetInclFilter(std::string(filter_))); | ||
return(!eCAL::Monitoring::SetInclFilter(std::string(filter_))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::SetInclFilter" is directly included [misc-include-cleaner]
return(!eCAL::Monitoring::SetInclFilter(std::string(filter_)));
^
} | ||
|
||
ECALC_API int eCAL_Monitoring_SetFilterState(int state_) | ||
{ | ||
return(eCAL::Monitoring::SetFilterState(state_ != 0)); | ||
return(!eCAL::Monitoring::SetFilterState(state_ != 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
return(!eCAL::Monitoring::SetFilterState(state_ != 0)); | |
returnstatic_cast<int>(!eCAL::Monitoring::SetFilterState(state_ != 0)); |
} | ||
|
||
ECALC_API int eCAL_Monitoring_SetFilterState(int state_) | ||
{ | ||
return(eCAL::Monitoring::SetFilterState(state_ != 0)); | ||
return(!eCAL::Monitoring::SetFilterState(state_ != 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::SetFilterState" is directly included [misc-include-cleaner]
return(!eCAL::Monitoring::SetFilterState(state_ != 0));
^
} | ||
|
||
ECALC_API int eCAL_Monitoring_GetMonitoring(void* buf_, int buf_len_) | ||
{ | ||
std::string buf; | ||
if (eCAL::Monitoring::GetMonitoring(buf) != 0) | ||
if (eCAL::Monitoring::GetMonitoring(buf)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::GetMonitoring" is directly included [misc-include-cleaner]
if (eCAL::Monitoring::GetMonitoring(buf))
^
@@ -1055,7 +1055,7 @@ PyObject* mon_monitoring(PyObject* /*self*/, PyObject* /*args*/) | |||
PyObject* retDict = PyDict_New(); | |||
|
|||
eCAL::Monitoring::SMonitoring monitoring; | |||
if (eCAL::Monitoring::GetMonitoring(monitoring) != 0) | |||
if (eCAL::Monitoring::GetMonitoring(monitoring)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::GetMonitoring" is directly included [misc-include-cleaner]
if (eCAL::Monitoring::GetMonitoring(monitoring))
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -32,23 +32,23 @@ extern "C" | |||
{ | |||
ECALC_API int eCAL_Monitoring_SetExclFilter(const char* filter_) | |||
{ | |||
return(eCAL::Monitoring::SetExclFilter(std::string(filter_))); | |||
return(static_cast<int>(!eCAL::Monitoring::SetExclFilter(std::string(filter_)))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::SetExclFilter" is directly included [misc-include-cleaner]
ecal/core/src/cimpl/ecal_monitoring_cimpl.cpp:27:
- #include "ecal_common_cimpl.h"
+ #include "ecal/ecal_monitoring.h"
+ #include "ecal_common_cimpl.h"
@@ -32,23 +32,23 @@ | |||
{ | |||
ECALC_API int eCAL_Monitoring_SetExclFilter(const char* filter_) | |||
{ | |||
return(eCAL::Monitoring::SetExclFilter(std::string(filter_))); | |||
return(static_cast<int>(!eCAL::Monitoring::SetExclFilter(std::string(filter_)))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::string" is directly included [misc-include-cleaner]
ecal/core/src/cimpl/ecal_monitoring_cimpl.cpp:26:
+ #include <string>
} | ||
|
||
ECALC_API int eCAL_Monitoring_SetInclFilter(const char* filter_) | ||
{ | ||
return(eCAL::Monitoring::SetInclFilter(std::string(filter_))); | ||
return(static_cast<int>(!eCAL::Monitoring::SetInclFilter(std::string(filter_)))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::SetInclFilter" is directly included [misc-include-cleaner]
return(static_cast<int>(!eCAL::Monitoring::SetInclFilter(std::string(filter_))));
^
} | ||
|
||
ECALC_API int eCAL_Monitoring_SetFilterState(int state_) | ||
{ | ||
return(eCAL::Monitoring::SetFilterState(state_ != 0)); | ||
return(static_cast<int>(!eCAL::Monitoring::SetFilterState(state_ != 0))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Monitoring::SetFilterState" is directly included [misc-include-cleaner]
return(static_cast<int>(!eCAL::Monitoring::SetFilterState(state_ != 0)));
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍀
This is a follow-up on #1859