diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-08 16:26:38 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-09 11:28:30 +0000 |
commit | daa0e2e6b1d9efce6569203ee4889d4707a9abd0 (patch) | |
tree | 0158ac160a090b94c5d725f82d1f7947210148a3 /src/quick/scenegraph/coreapi/qsggeometry.cpp | |
parent | 75423185e4b03fabfeeee403f3bd9a6063078ee6 (diff) |
Fix shadowing and rvalue warnings
The tests attempt to initialize the struct members directly is invalid
in any case. The static create() functions are mandatory since new members
may be added (via the reserved bits) at any time.
Also expand the Attribute struct spec to keep VS2012 happy (this can be
reverted later once it's gone from CI).
Change-Id: Ibec1fdb8e2787c3665ec397b6adb906210d570e4
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsggeometry.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index 152bb253d7..d1e1bc0176 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -59,7 +59,13 @@ QSGGeometry::Attribute QSGGeometry::Attribute::create(int attributeIndex, int tu QSGGeometry::Attribute QSGGeometry::Attribute::createWithSemantic(int pos, int tupleSize, int type, Semantic semantic) { - Attribute a = { pos, tupleSize, type, semantic == POSITION, semantic, 0 }; + Attribute a; + a.position = pos; + a.tupleSize = tupleSize; + a.type = type; + a.isVertexCoordinate = semantic == POSITION; + a.semantic = semantic; + a.reserved = 0; return a; } |