summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-06-03 18:05:04 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-06-13 11:16:19 +0200
commit2bdecdf9f9a93c30f7d482f9993c47b86a9f5eb8 (patch)
treeef946d0f27b721f12662047beda6ff1d3cb31e23 /src
parent9b6c2e6940ed33a87a20274eda19320e8c688fdf (diff)
downloadqtlocation-mapboxgl-2bdecdf9f9a93c30f7d482f9993c47b86a9f5eb8.tar.gz
[core] fix pedantic warning messages
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/geometry/glyph_atlas.cpp2
-rw-r--r--src/mbgl/geometry/line_atlas.cpp4
-rw-r--r--src/mbgl/map/camera.cpp1
-rw-r--r--src/mbgl/renderer/frame_history.cpp2
-rw-r--r--src/mbgl/renderer/symbol_bucket.cpp2
-rw-r--r--src/mbgl/sprite/sprite_atlas.cpp2
-rw-r--r--src/mbgl/style/parser.cpp2
-rw-r--r--src/mbgl/style/property_evaluator.cpp18
-rw-r--r--src/mbgl/style/property_parsing.cpp18
-rw-r--r--src/mbgl/tile/tile.cpp3
-rw-r--r--src/mbgl/tile/tile_cache.cpp4
-rw-r--r--src/mbgl/util/grid_index.cpp2
-rw-r--r--src/mbgl/util/mat2.cpp2
-rw-r--r--src/mbgl/util/mat3.cpp2
-rw-r--r--src/mbgl/util/tile_coordinate.cpp1
-rw-r--r--src/mbgl/util/work_task.cpp0
16 files changed, 30 insertions, 35 deletions
diff --git a/src/mbgl/geometry/glyph_atlas.cpp b/src/mbgl/geometry/glyph_atlas.cpp
index b4687b8e07..524b99c12b 100644
--- a/src/mbgl/geometry/glyph_atlas.cpp
+++ b/src/mbgl/geometry/glyph_atlas.cpp
@@ -197,4 +197,4 @@ void GlyphAtlas::bind(gl::ObjectStore& store) {
} else {
MBGL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, *texture));
}
-};
+}
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp
index 830640f780..b1f012d484 100644
--- a/src/mbgl/geometry/line_atlas.cpp
+++ b/src/mbgl/geometry/line_atlas.cpp
@@ -119,7 +119,7 @@ LinePatternPos LineAtlas::addDash(const std::vector<float> &dasharray, bool roun
bind(store);
return position;
-};
+}
void LineAtlas::upload(gl::ObjectStore& store) {
if (dirty) {
@@ -171,4 +171,4 @@ void LineAtlas::bind(gl::ObjectStore& store) {
dirty = false;
}
-};
+}
diff --git a/src/mbgl/map/camera.cpp b/src/mbgl/map/camera.cpp
deleted file mode 100644
index 4a45e904f8..0000000000
--- a/src/mbgl/map/camera.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include <mbgl/map/camera.hpp>
diff --git a/src/mbgl/renderer/frame_history.cpp b/src/mbgl/renderer/frame_history.cpp
index dbaf8fbf7a..5173d9d5a1 100644
--- a/src/mbgl/renderer/frame_history.cpp
+++ b/src/mbgl/renderer/frame_history.cpp
@@ -6,7 +6,7 @@ using namespace mbgl;
FrameHistory::FrameHistory() {
changeOpacities.fill(0);
opacities.fill(0);
-};
+}
void FrameHistory::record(const TimePoint& now, float zoom, const Duration& duration) {
diff --git a/src/mbgl/renderer/symbol_bucket.cpp b/src/mbgl/renderer/symbol_bucket.cpp
index fb312661a7..ff2c80c147 100644
--- a/src/mbgl/renderer/symbol_bucket.cpp
+++ b/src/mbgl/renderer/symbol_bucket.cpp
@@ -57,7 +57,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor, const GeometryCoordinates& line,
// Create the collision features that will be used to check whether this symbol instance can be placed
textCollisionFeature(line, anchor, shapedText, textBoxScale, textPadding, textAlongLine, indexedFeature),
iconCollisionFeature(line, anchor, shapedIcon, iconBoxScale, iconPadding, iconAlongLine, indexedFeature)
- {};
+ {}
SymbolBucket::SymbolBucket(uint32_t overscaling_, float zoom_, const MapMode mode_, const std::string& bucketName_, const std::string& sourceLayerName_)
diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp
index 5d7d01deb3..df821a990a 100644
--- a/src/mbgl/sprite/sprite_atlas.cpp
+++ b/src/mbgl/sprite/sprite_atlas.cpp
@@ -243,7 +243,7 @@ void SpriteAtlas::bind(bool linear, gl::ObjectStore& objectStore) {
// pixelWidth, pixelHeight, pixelWidth, pixelHeight);
#endif
}
-};
+}
SpriteAtlas::~SpriteAtlas() = default;
diff --git a/src/mbgl/style/parser.cpp b/src/mbgl/style/parser.cpp
index 28a7d2e81b..fb82a2084c 100644
--- a/src/mbgl/style/parser.cpp
+++ b/src/mbgl/style/parser.cpp
@@ -484,7 +484,7 @@ void Parser::parseLayer(const std::string& id, const JSValue& value, std::unique
MBGL_DEFINE_ENUM_CLASS(VisibilityTypeClass, VisibilityType, {
{ VisibilityType::Visible, "visible" },
{ VisibilityType::None, "none" },
-});
+})
void Parser::parseVisibility(Layer& layer, const JSValue& value) {
Layer::Impl& impl = *layer.baseImpl;
diff --git a/src/mbgl/style/property_evaluator.cpp b/src/mbgl/style/property_evaluator.cpp
index ce132e0b5b..3993456b6d 100644
--- a/src/mbgl/style/property_evaluator.cpp
+++ b/src/mbgl/style/property_evaluator.cpp
@@ -21,15 +21,15 @@ template <> inline std::vector<std::string> defaultStopsValue() { return {{}}; }
template <> inline std::array<float, 2> defaultStopsValue() { return {{ 0, 0 }}; }
template <> inline std::string defaultStopsValue() { return {}; }
-template <> inline TranslateAnchorType defaultStopsValue() { return {}; };
-template <> inline RotateAnchorType defaultStopsValue() { return {}; };
-template <> inline LineCapType defaultStopsValue() { return {}; };
-template <> inline LineJoinType defaultStopsValue() { return {}; };
-template <> inline SymbolPlacementType defaultStopsValue() { return {}; };
-template <> inline TextAnchorType defaultStopsValue() { return {}; };
-template <> inline TextJustifyType defaultStopsValue() { return {}; };
-template <> inline TextTransformType defaultStopsValue() { return {}; };
-template <> inline AlignmentType defaultStopsValue() { return {}; };
+template <> inline TranslateAnchorType defaultStopsValue() { return {}; }
+template <> inline RotateAnchorType defaultStopsValue() { return {}; }
+template <> inline LineCapType defaultStopsValue() { return {}; }
+template <> inline LineJoinType defaultStopsValue() { return {}; }
+template <> inline SymbolPlacementType defaultStopsValue() { return {}; }
+template <> inline TextAnchorType defaultStopsValue() { return {}; }
+template <> inline TextJustifyType defaultStopsValue() { return {}; }
+template <> inline TextTransformType defaultStopsValue() { return {}; }
+template <> inline AlignmentType defaultStopsValue() { return {}; }
template <typename T>
T PropertyEvaluator<T>::operator()(const Function<T>& fn) const {
diff --git a/src/mbgl/style/property_parsing.cpp b/src/mbgl/style/property_parsing.cpp
index ecfa85595d..6e5174e936 100644
--- a/src/mbgl/style/property_parsing.cpp
+++ b/src/mbgl/style/property_parsing.cpp
@@ -58,7 +58,7 @@ optional<Color> parseConstant(const char* name, const JSValue& value) {
MBGL_DEFINE_ENUM_CLASS(TranslateAnchorTypeClass, TranslateAnchorType, {
{ TranslateAnchorType::Map, "map" },
{ TranslateAnchorType::Viewport, "viewport" },
-});
+})
template <>
optional<TranslateAnchorType> parseConstant(const char* name, const JSValue& value) {
@@ -73,7 +73,7 @@ optional<TranslateAnchorType> parseConstant(const char* name, const JSValue& val
MBGL_DEFINE_ENUM_CLASS(RotateAnchorTypeClass, RotateAnchorType, {
{ RotateAnchorType::Map, "map" },
{ RotateAnchorType::Viewport, "viewport" },
-});
+})
template <>
optional<RotateAnchorType> parseConstant<RotateAnchorType>(const char* name, const JSValue& value) {
@@ -89,7 +89,7 @@ MBGL_DEFINE_ENUM_CLASS(LineCapTypeClass, LineCapType, {
{ LineCapType::Round, "round" },
{ LineCapType::Butt, "butt" },
{ LineCapType::Square, "square" },
-});
+})
template <>
optional<LineCapType> parseConstant<LineCapType>(const char* name, const JSValue& value) {
@@ -107,7 +107,7 @@ MBGL_DEFINE_ENUM_CLASS(LineJoinTypeClass, LineJoinType, {
{ LineJoinType::Round, "round" },
{ LineJoinType::FakeRound, "fakeround" },
{ LineJoinType::FlipBevel, "flipbevel" },
-});
+})
template <>
optional<LineJoinType> parseConstant<LineJoinType>(const char* name, const JSValue& value) {
@@ -122,7 +122,7 @@ optional<LineJoinType> parseConstant<LineJoinType>(const char* name, const JSVal
MBGL_DEFINE_ENUM_CLASS(SymbolPlacementTypeClass, SymbolPlacementType, {
{ SymbolPlacementType::Point, "point" },
{ SymbolPlacementType::Line, "line" },
-});
+})
template <>
optional<SymbolPlacementType> parseConstant<SymbolPlacementType>(const char* name, const JSValue& value) {
@@ -144,7 +144,7 @@ MBGL_DEFINE_ENUM_CLASS(TextAnchorTypeClass, TextAnchorType, {
{ TextAnchorType::TopRight, "top-right" },
{ TextAnchorType::BottomLeft, "bottom-left" },
{ TextAnchorType::BottomRight, "bottom-right" }
-});
+})
template <>
optional<TextAnchorType> parseConstant<TextAnchorType>(const char* name, const JSValue& value) {
@@ -160,7 +160,7 @@ MBGL_DEFINE_ENUM_CLASS(TextJustifyTypeClass, TextJustifyType, {
{ TextJustifyType::Center, "center" },
{ TextJustifyType::Left, "left" },
{ TextJustifyType::Right, "right" },
-});
+})
template <>
optional<TextJustifyType> parseConstant<TextJustifyType>(const char* name, const JSValue& value) {
@@ -176,7 +176,7 @@ MBGL_DEFINE_ENUM_CLASS(TextTransformTypeClass, TextTransformType, {
{ TextTransformType::None, "none" },
{ TextTransformType::Uppercase, "uppercase" },
{ TextTransformType::Lowercase, "lowercase" },
-});
+})
template <>
optional<TextTransformType> parseConstant<TextTransformType>(const char* name, const JSValue& value) {
@@ -191,7 +191,7 @@ optional<TextTransformType> parseConstant<TextTransformType>(const char* name, c
MBGL_DEFINE_ENUM_CLASS(AlignmentTypeClass, AlignmentType, {
{ AlignmentType::Map, "map" },
{ AlignmentType::Viewport, "viewport" },
-});
+})
template <>
optional<AlignmentType> parseConstant<AlignmentType>(const char* name, const JSValue& value) {
diff --git a/src/mbgl/tile/tile.cpp b/src/mbgl/tile/tile.cpp
deleted file mode 100644
index a1d36421a4..0000000000
--- a/src/mbgl/tile/tile.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <mbgl/tile/tile.hpp>
-
-using namespace mbgl;
diff --git a/src/mbgl/tile/tile_cache.cpp b/src/mbgl/tile/tile_cache.cpp
index e012ef0b7e..619d813fd2 100644
--- a/src/mbgl/tile/tile_cache.cpp
+++ b/src/mbgl/tile/tile_cache.cpp
@@ -37,7 +37,7 @@ void TileCache::add(const OverscaledTileID& key, std::unique_ptr<TileData> data)
}
assert(orderedKeys.size() <= size);
-};
+}
std::unique_ptr<TileData> TileCache::get(const OverscaledTileID& key) {
@@ -52,7 +52,7 @@ std::unique_ptr<TileData> TileCache::get(const OverscaledTileID& key) {
}
return data;
-};
+}
bool TileCache::has(const OverscaledTileID& key) {
return tiles.find(key) != tiles.end();
diff --git a/src/mbgl/util/grid_index.cpp b/src/mbgl/util/grid_index.cpp
index 4877a90e72..cc31faeee1 100644
--- a/src/mbgl/util/grid_index.cpp
+++ b/src/mbgl/util/grid_index.cpp
@@ -17,7 +17,7 @@ GridIndex<T>::GridIndex(int32_t extent_, int32_t n_, int32_t padding_) :
max(extent + double(padding) / n * extent)
{
cells.resize(d * d);
- };
+ }
template <class T>
void GridIndex<T>::insert(T&& t, const BBox& bbox) {
diff --git a/src/mbgl/util/mat2.cpp b/src/mbgl/util/mat2.cpp
index 6910244541..ca60dce9c5 100644
--- a/src/mbgl/util/mat2.cpp
+++ b/src/mbgl/util/mat2.cpp
@@ -41,7 +41,7 @@ void matrix::rotate(mat2& out, const mat2& a, double rad) {
out[1] = a1 * c + a3 * s;
out[2] = a0 * -s + a2 * c;
out[3] = a1 * -s + a3 * c;
-};
+}
void matrix::scale(mat2& out, const mat2& a, double v0, double v1) {
double a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
diff --git a/src/mbgl/util/mat3.cpp b/src/mbgl/util/mat3.cpp
index f4ae8841d5..88c769790e 100644
--- a/src/mbgl/util/mat3.cpp
+++ b/src/mbgl/util/mat3.cpp
@@ -80,7 +80,7 @@ void matrix::rotate(mat3& out, const mat3& a, double rad) {
out[6] = a20;
out[7] = a21;
out[8] = a22;
-};
+}
void matrix::scale(mat3& out, const mat3& a, double x, double y) {
out[0] = x * a[0];
diff --git a/src/mbgl/util/tile_coordinate.cpp b/src/mbgl/util/tile_coordinate.cpp
deleted file mode 100644
index d9a0ea352c..0000000000
--- a/src/mbgl/util/tile_coordinate.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include <mbgl/util/tile_coordinate.hpp>
diff --git a/src/mbgl/util/work_task.cpp b/src/mbgl/util/work_task.cpp
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/mbgl/util/work_task.cpp
+++ /dev/null