aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-07 14:42:59 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-05-13 20:30:26 +0000
commit30aa0a1cc9812bd2a9ead91e3f412808ebe7daff (patch)
tree3165986d36f4727bb8ec111b7db22eb45a067867 /src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
parent66be8fcc05f0e51f12c215af3d5ab74d729386ba (diff)
QtQuick: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c9589afabc7ade Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index 8996d5a092..f87dd75c8c 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -85,7 +85,12 @@ public:
for (int i=0; i<PageSize; ++i) blocks[i] = i;
}
- Type *at(uint index) const
+ const Type *at(uint index) const
+ {
+ return (Type *) &data[index * sizeof(Type)];
+ }
+
+ Type *at(uint index)
{
return (Type *) &data[index * sizeof(Type)];
}