QmlPuppet: Adapt to C++ 17 [[maybe_unused]]

It has the advantage to to move the attribute to the declaration instead
of using a workaround.

Change-Id: Ia6115ab8fefbe03f247edfea2b7bed73e9149068
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2022-07-07 17:35:44 +02:00
committed by Tim Jenssen
parent 1e6c8f6e61
commit 67324512e9
17 changed files with 76 additions and 136 deletions

View File

@@ -50,8 +50,9 @@ Quick3DNodeInstance::~Quick3DNodeInstance()
{
}
void Quick3DNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance,
InstanceContainer::NodeFlags flags)
void Quick3DNodeInstance::initialize(
[[maybe_unused]] const ObjectNodeInstance::Pointer &objectNodeInstance,
[[maybe_unused]] InstanceContainer::NodeFlags flags)
{
#ifdef QUICK3D_MODULE
QObject *obj = object();
@@ -82,9 +83,6 @@ void Quick3DNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNo
m_dummyRootViewCreateFunction = "createViewForNode";
Quick3DRenderableNodeInstance::initialize(objectNodeInstance, flags);
#else
Q_UNUSED(objectNodeInstance)
Q_UNUSED(flags)
#endif // QUICK3D_MODULE
}