summaryrefslogtreecommitdiffstats
path: root/src/render/io
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-26 12:51:54 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-28 09:57:44 +0100
commita2c6c81f5c67390629a313ff7ba985d0967ca1fa (patch)
treee812286604ff3b34fe6678e145590b739de6d72b /src/render/io
parent4f46ccc4517a52b152d36e7734c2042e06ea8de3 (diff)
parent1c52a489c1eed52107cdde28890ca230424bd85b (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/input/backend/updateaxisactionjob.cpp src/render/renderstates/qalphacoverage.cpp src/render/renderstates/qclipplane.cpp src/render/renderstates/qdithering.cpp src/render/renderstates/qseamlesscubemap.cpp src/render/renderstates/qstenciltest.cpp Change-Id: I5b279d30bbbb06af5e8ee9fc47e9794b78a567f5
Diffstat (limited to 'src/render/io')
-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)
{