diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-10 18:51:04 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-12 18:07:36 +0300 |
commit | fa36110dfbdc05b511a3f85461eaca4a29e446a1 (patch) | |
tree | 284bd9a9eca229c026e531bbce1a9f0dd6ba089d /src/mbgl/gl | |
parent | f709d7b0557d3e6d652d9b7d8380f1380962a327 (diff) | |
download | qtlocation-mapboxgl-fa36110dfbdc05b511a3f85461eaca4a29e446a1.tar.gz |
[tidy] modernize-use-auto
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r-- | src/mbgl/gl/context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 3ab1260d27..6a68c3ff69 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -45,7 +45,7 @@ Context::~Context() { } void Context::initializeExtensions(const std::function<gl::ProcAddress(const char*)>& getProcAddress) { - if (const char* extensions = + if (const auto* extensions = reinterpret_cast<const char*>(MBGL_CHECK_ERROR(glGetString(GL_EXTENSIONS)))) { auto fn = [&]( @@ -94,7 +94,7 @@ UniqueShader Context::createShader(ShaderType type, const std::string& source) { UniqueShader result { MBGL_CHECK_ERROR(glCreateShader(static_cast<GLenum>(type))), { this } }; const GLchar* sources = source.data(); - const GLsizei lengths = static_cast<GLsizei>(source.length()); + const auto lengths = static_cast<GLsizei>(source.length()); MBGL_CHECK_ERROR(glShaderSource(result, 1, &sources, &lengths)); MBGL_CHECK_ERROR(glCompileShader(result)); |