diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-05-02 15:40:33 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-05-05 17:32:34 +0000 |
commit | a234bbbf648c777153013ce747ddad84a84894af (patch) | |
tree | 0595dcca5adb6f8adfe62dd4e411d29944851fb6 /src/plugins | |
parent | 6706cb46eb463357cffe7c57988a768156b2ae79 (diff) |
GLTFIO: avoid some hidden detaches
... using qAsConst() or just declaring variables
const in the first place.
Saves a few bytes on text size, too.
Change-Id: I2f4510cf3cdd092b1e1308f9f09c8b694de355e6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sceneparsers/gltf/gltfio.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sceneparsers/gltf/gltfio.cpp b/src/plugins/sceneparsers/gltf/gltfio.cpp index 939404fcd..2b8dea4da 100644 --- a/src/plugins/sceneparsers/gltf/gltfio.cpp +++ b/src/plugins/sceneparsers/gltf/gltfio.cpp @@ -268,7 +268,7 @@ Qt3DCore::QEntity* GLTFIO::node(const QString &id) case 0: break; case 1: - result = entities.first(); + result = qAsConst(entities).first(); default: result = new QEntity; for (QEntity *entity : qAsConst(entities)) @@ -1280,7 +1280,7 @@ QVariant GLTFIO::parameterValueFromJSON(int type, const QJsonValue &value) const } } else if (value.isArray()) { - QJsonArray valueArray = value.toArray(); + const QJsonArray valueArray = value.toArray(); QVector2D vector2D; QVector3D vector3D; |