From 5a59b5f5fcdf3e13e2e3812066719231ae30aef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Mon, 18 Aug 2014 14:05:52 +0200 Subject: fix warnings --- src/map/map.cpp | 5 ----- src/style/style_parser.cpp | 1 + src/text/glyph_store.cpp | 2 +- src/util/filesource.cpp | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/map/map.cpp b/src/map/map.cpp index dfac1ae6c7..6aa9071a4f 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -532,13 +532,8 @@ void Map::prepare() { transform.updateTransitions(animationTime); } - const TransformState oldState = state; state = transform.currentState(); - bool pixelRatioChanged = oldState.getPixelRatio() != state.getPixelRatio(); - bool dimensionsChanged = oldState.getFramebufferWidth() != state.getFramebufferWidth() || - oldState.getFramebufferHeight() != state.getFramebufferHeight(); - animationTime = util::now(); updateSources(); style->updateProperties(state.getNormalizedZoom(), animationTime); diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index 0c0636695e..c2689162e2 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -465,6 +465,7 @@ std::unique_ptr StyleParser::createLayers(JSVal value) { return group; } else { Log::Warning(Event::ParseStyle, "layers must be an array"); + return nullptr; } } diff --git a/src/text/glyph_store.cpp b/src/text/glyph_store.cpp index c32e1642e5..09f2fbc7b3 100644 --- a/src/text/glyph_store.cpp +++ b/src/text/glyph_store.cpp @@ -132,7 +132,7 @@ void FontStack::lineWrap(Shaping &shaping, const float lineHeight, const float m maxLineLength = maxLineLength || shaping.back().x; - justifyLine(shaping, metrics, lineStartIndex, shaping.size() - 1, justify); + justifyLine(shaping, metrics, lineStartIndex, uint32_t(shaping.size()) - 1, justify); align(shaping, justify, horizontalAlign, verticalAlign, maxLineLength, lineHeight, line); } diff --git a/src/util/filesource.cpp b/src/util/filesource.cpp index 2bbf146b0c..503d4dfb1d 100644 --- a/src/util/filesource.cpp +++ b/src/util/filesource.cpp @@ -17,7 +17,7 @@ const std::string &FileSource::getBase() const { return base; } -void FileSource::load(ResourceType type, const std::string &url, std::function callback, const std::shared_ptr loop) { +void FileSource::load(ResourceType /*type*/, const std::string &url, std::function callback, const std::shared_ptr loop) { // convert relative URLs to absolute URLs const std::string absoluteURL = [&]() -> std::string { -- cgit v1.2.1