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:
Patrick Ohly 2016-08-29 04:55:24 -07:00
parent d560aeda07
commit 16e6e854c3
1 changed files with 2 additions and 0 deletions

View File

@ -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;