summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-08-18 14:05:52 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-08-18 14:05:52 +0200
commit5a59b5f5fcdf3e13e2e3812066719231ae30aef7 (patch)
tree1219206b949e8f73bee5d31812cea7cb8f548801 /src
parent2076d3d97bf7cf33aa93285debdfd8181a9c2f33 (diff)
downloadqtlocation-mapboxgl-5a59b5f5fcdf3e13e2e3812066719231ae30aef7.tar.gz
fix warnings
Diffstat (limited to 'src')
-rw-r--r--src/map/map.cpp5
-rw-r--r--src/style/style_parser.cpp1
-rw-r--r--src/text/glyph_store.cpp2
-rw-r--r--src/util/filesource.cpp2
4 files changed, 3 insertions, 7 deletions
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<StyleLayerGroup> 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<void(platform::Response *)> callback, const std::shared_ptr<uv::loop> loop) {
+void FileSource::load(ResourceType /*type*/, const std::string &url, std::function<void(platform::Response *)> callback, const std::shared_ptr<uv::loop> loop) {
// convert relative URLs to absolute URLs
const std::string absoluteURL = [&]() -> std::string {