gdbus-cxx-bridge.h: avoid false cppcheck warning
cppcheck seems to mix up different template variations. The following error needs to be suppressed in the classes which don't even have an m_a member: gdbus-cxx-bridge.h:330: cppcheck warning: uninitMemberVar - Member variable 'Set::m_a' is not initialized in the constructor. gdbus-cxx-bridge.h:339: cppcheck warning: uninitMemberVar - Member variable 'Set::m_a' is not initialized in the constructor.
This commit is contained in:
parent
d560aeda07
commit
16e6e854c3
|
@ -327,6 +327,7 @@ struct AppendArgs {
|
|||
/** default: skip it, not a result of the method */
|
||||
template<class A> struct Set
|
||||
{
|
||||
// cppcheck-suppress uninitMemberVar
|
||||
Set(A &a) {}
|
||||
AppendArgs &set(AppendArgs &context) const {
|
||||
return context;
|
||||
|
@ -336,6 +337,7 @@ template<class A> struct Set
|
|||
/** same for const reference */
|
||||
template<class A> struct Set <const A &>
|
||||
{
|
||||
// cppcheck-suppress uninitMemberVar
|
||||
Set(A &a) {}
|
||||
AppendArgs &set(AppendArgs &context) const {
|
||||
return context;
|
||||
|
|
Loading…
Reference in New Issue