diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-31 18:14:41 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-31 18:15:09 +0300 |
commit | cbfc84aff44b206af76ed380cd5c6ea42bb58f61 (patch) | |
tree | 5af9d4500be1eb62eb6a33a6a671d29833df7eaa /src/mbgl/shader/icon_shader.cpp | |
parent | 62b4dd554ab4df891221b1e43bda5a0f5dc1741a (diff) | |
download | qtlocation-mapboxgl-cbfc84aff44b206af76ed380cd5c6ea42bb58f61.tar.gz |
[core] Use init list for shader attributes
Shader parent object has been safely created, so it is safe to
initialize the *Shader attributes via initialization list.
Diffstat (limited to 'src/mbgl/shader/icon_shader.cpp')
-rw-r--r-- | src/mbgl/shader/icon_shader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/shader/icon_shader.cpp b/src/mbgl/shader/icon_shader.cpp index 2ff653a87c..7c60f07efa 100644 --- a/src/mbgl/shader/icon_shader.cpp +++ b/src/mbgl/shader/icon_shader.cpp @@ -8,10 +8,10 @@ using namespace mbgl; IconShader::IconShader(gl::GLObjectStore& glObjectStore) - : Shader("icon", shaders::icon::vertex, shaders::icon::fragment, glObjectStore) { - a_offset = MBGL_CHECK_ERROR(glGetAttribLocation(getID(), "a_offset")); - a_data1 = MBGL_CHECK_ERROR(glGetAttribLocation(getID(), "a_data1")); - a_data2 = MBGL_CHECK_ERROR(glGetAttribLocation(getID(), "a_data2")); + : Shader("icon", shaders::icon::vertex, shaders::icon::fragment, glObjectStore) + , a_offset(MBGL_CHECK_ERROR(glGetAttribLocation(getID(), "a_offset"))) + , a_data1(MBGL_CHECK_ERROR(glGetAttribLocation(getID(), "a_data1"))) + , a_data2(MBGL_CHECK_ERROR(glGetAttribLocation(getID(), "a_data2"))) { } void IconShader::bind(GLbyte* offset) { |