diff options
author | Liang Qi <liang.qi@qt.io> | 2019-08-20 10:55:33 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-08-21 08:06:48 +0200 |
commit | e1772c0a015ffac562b64e2c958a09d0ca074cd1 (patch) | |
tree | 0c8f73cfead62abf92dbb14c839075db0c2cd446 | |
parent | b669a0d133b027091117ecccd9e47aa8086ef4ff (diff) |
Fix a -Werror=shadow in Entity
Triggered by gcc version 4.8.5 (SUSE Linux):
src/core/nodes/qentity.h: In member function ‘QVector<T*> Qt3DCore::QEntity::componentsOfType() const’:
src/core/nodes/qentity.h:69:32: error: declaration of ‘components’ shadows a member of 'this' [-Werror=shadow]
const QComponentVector components = this->components();
^
Change-Id: I02507b3ff75b0f21d958955f3ce9a8b01f471d05
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
-rw-r--r-- | src/core/nodes/qentity.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h index f1a369c48..62398faa1 100644 --- a/src/core/nodes/qentity.h +++ b/src/core/nodes/qentity.h @@ -66,8 +66,8 @@ public: QVector<T *> componentsOfType() const { QVector<T*> matchComponents; - const QComponentVector components = this->components(); - for (QComponent *component : components) { + const QComponentVector comps = this->components(); + for (QComponent *component : comps) { T *typedComponent = qobject_cast<T*>(component); if (typedComponent != nullptr) matchComponents.append(typedComponent); |