diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/backend/attachmentpack.cpp | 6 | ||||
-rw-r--r-- | src/render/backend/attachmentpack_p.h | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/render/backend/attachmentpack.cpp b/src/render/backend/attachmentpack.cpp index 0cd5d8673..00b70a7aa 100644 --- a/src/render/backend/attachmentpack.cpp +++ b/src/render/backend/attachmentpack.cpp @@ -59,13 +59,13 @@ AttachmentPack::AttachmentPack(const RenderTarget *target, for (Qt3DCore::QNodeId outputId : outputIds) { const RenderTargetOutput *output = attachmentManager->lookupResource(outputId); if (output) - m_attachments.append(*output->attachment()); + m_attachments.push_back(*output->attachment()); } // Create actual DrawBuffers list that is used for glDrawBuffers // If nothing is specified, use all the attachments as draw buffers - if (drawBuffers.isEmpty()) { + if (drawBuffers.empty()) { m_drawBuffers.reserve(m_attachments.size()); for (const Attachment &attachment : qAsConst(m_attachments)) // only consider Color Attachments @@ -82,7 +82,7 @@ AttachmentPack::AttachmentPack(const RenderTarget *target, // return index of given attachment within actual draw buffers list int AttachmentPack::getDrawBufferIndex(QRenderTargetOutput::AttachmentPoint attachmentPoint) const { - for (int i = 0; i < m_drawBuffers.size(); i++) + for (size_t i = 0; i < m_drawBuffers.size(); i++) if (m_drawBuffers.at(i) == (int)attachmentPoint) return i; return -1; diff --git a/src/render/backend/attachmentpack_p.h b/src/render/backend/attachmentpack_p.h index 7f3733a65..473f48489 100644 --- a/src/render/backend/attachmentpack_p.h +++ b/src/render/backend/attachmentpack_p.h @@ -87,17 +87,17 @@ public: AttachmentPack(); AttachmentPack(const RenderTarget *target, AttachmentManager *attachmentManager, - const QVector<QRenderTargetOutput::AttachmentPoint> &drawBuffers = QVector<QRenderTargetOutput::AttachmentPoint>()); + const QVector<QRenderTargetOutput::AttachmentPoint> &drawBuffers = {}); - QVector<Attachment> attachments() const { return m_attachments; } - QVector<int> getGlDrawBuffers() const { return m_drawBuffers; } + const std::vector<Attachment> &attachments() const { return m_attachments; } + const std::vector<int> &getGlDrawBuffers() const { return m_drawBuffers; } // return index of given attachment within actual draw buffers list int getDrawBufferIndex(QRenderTargetOutput::AttachmentPoint attachmentPoint) const; private: - QVector<Attachment> m_attachments; - QVector<int> m_drawBuffers; + std::vector<Attachment> m_attachments; + std::vector<int> m_drawBuffers; }; Q_3DRENDERSHARED_PRIVATE_EXPORT bool operator ==(const Attachment &a, const Attachment &b); |