summaryrefslogtreecommitdiffstats
path: root/src/render/backend/entity_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2020-06-25 16:42:58 +0200
committerPaul Lemire <paul.lemire@kdab.com>2020-06-30 15:32:16 +0200
commit4a2ca889fa67a364c83e83ab931d0df0d41188e6 (patch)
tree38a2ea2a7eadcfa3dd188bb2ad459a0cae677fa5 /src/render/backend/entity_p.h
parent0a69fa7279e6f9bbc77483247c2742005675d6a8 (diff)
Switch to std::vector in QRenderAspect backend and OpenGL renderer
Change-Id: I91dd69fc205401b12f333a9a0534d9612c8e24f8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/render/backend/entity_p.h')
-rw-r--r--src/render/backend/entity_p.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/render/backend/entity_p.h b/src/render/backend/entity_p.h
index a66dd2956..0d4a9d980 100644
--- a/src/render/backend/entity_p.h
+++ b/src/render/backend/entity_p.h
@@ -146,9 +146,12 @@ public:
}
template<class Backend>
- QVector<Backend *> renderComponents() const
+ std::vector<Backend *> renderComponents() const
{
- return QVector<Backend *>();
+ // We should never reach this, we expect specialization to have been
+ // specified
+ Q_UNREACHABLE();
+ return {};
}
template<class Backend>
@@ -233,7 +236,7 @@ private:
Q_3DRENDERSHARED_PRIVATE_EXPORT QVector<Handle> Entity::componentsHandle<Type>() const; \
/* Component */ \
template<> \
- Q_3DRENDERSHARED_PRIVATE_EXPORT QVector<Type *> Entity::renderComponents<Type>() const; \
+ Q_3DRENDERSHARED_PRIVATE_EXPORT std::vector<Type *> Entity::renderComponents<Type>() const; \
/* Uuid */ \
template<> \
Q_3DRENDERSHARED_PRIVATE_EXPORT Qt3DCore::QNodeIdVector Entity::componentsUuid<Type>() const;
@@ -272,10 +275,10 @@ private:
} \
/* Component */ \
template<> \
- QVector<Type *> Entity::renderComponents<Type>() const \
+ std::vector<Type *> Entity::renderComponents<Type>() const \
{ \
Manager *manager = m_nodeManagers->manager<Type, Manager>(); \
- QVector<Type *> entries; \
+ std::vector<Type *> entries; \
entries.reserve(variable.size()); \
for (const QNodeId id : variable) \
entries.push_back(manager->lookupResource(id)); \