summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-10-02 18:51:42 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-03 10:31:24 -0700
commit504a8747ce2e4eb654eb423f8075536ba6700c05 (patch)
treea20a005a9e4dcd666c858efd202a970c978644ed
parent280fd8c28ed670418954e0a6e2f26292419103d6 (diff)
downloadqtlocation-mapboxgl-upstream/Wshorten-64-to-32.tar.gz
[build] Use -Wshorten-64-to-32 everywhereupstream/Wshorten-64-to-32
Not just on iOS builds.
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/mbgl/util/raster.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 79c85829e1..0a7c908ada 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@ endif(WITH_COVERAGE)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Wshadow -Werror -Wno-variadic-macros -Wno-unknown-pragmas")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Wshadow -Wshorten-64-to-32 -Werror -Wno-variadic-macros -Wno-unknown-pragmas")
if(APPLE)
# -Wno-error=unused-command-line-argument is required due to https://llvm.org/bugs/show_bug.cgi?id=7798
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-command-line-argument")
diff --git a/src/mbgl/util/raster.cpp b/src/mbgl/util/raster.cpp
index 885230c7ec..ec18d8e0e3 100644
--- a/src/mbgl/util/raster.cpp
+++ b/src/mbgl/util/raster.cpp
@@ -77,7 +77,7 @@ void Raster::upload(gl::Context& context, uint32_t unit) {
context.texture[unit] = *texture;
updateFilter();
#if not MBGL_USE_GLES2
- MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, images.size()));
+ MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, static_cast<GLint>(images.size())));
#endif // MBGL_USE_GLES2
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
MBGL_CHECK_ERROR(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));