summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Salmela <mika.salmela@qt.io>2016-11-01 13:07:40 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-11-01 17:20:26 +0000
commitd5da99a1e2602e99ed916206df1728eb540a7dc5 (patch)
tree679105320c1aacbd82c719232c3ea8987c77c21f
parentd2a033764ecd80f0ab242abe5484d7c1a48bf618 (diff)
Move struct Entry outside class ByteArraySplitter
Type info declaration must be before the struct Entry is used. Therefore this patch moves the definition before the ByteArraySplitter. Task-number: QTBUG-56789 Change-Id: I29e3ec35778778536c5e1de08b6b7133bb78c0f8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/render/io/objloader.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/render/io/objloader.cpp b/src/render/io/objloader.cpp
index d9610172f..686a9d5f0 100644
--- a/src/render/io/objloader.cpp
+++ b/src/render/io/objloader.cpp
@@ -60,10 +60,18 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+struct Entry
+{
+ int start;
+ int size;
+};
+QT3D_DECLARE_TYPEINFO(Qt3DRender, Entry, Q_PRIMITIVE_TYPE)
+
/*
* A helper class to split a QByteArray and access its sections without
* additional memory allocations.
*/
+
class ByteArraySplitter
{
public:
@@ -118,17 +126,10 @@ public:
return ByteArraySplitter(m_input + m_entries[index].start, m_input + m_entries[index].start + m_entries[index].size, delimiter, splitBehavior);
}
- struct Entry
- {
- int start;
- int size;
- };
-
private:
QVarLengthArray<Entry, 16> m_entries;
const char *m_input;
};
-QT3D_DECLARE_TYPEINFO(Qt3DRender, ByteArraySplitter::Entry, Q_PRIMITIVE_TYPE)
inline uint qHash(const FaceIndices &faceIndices)
{