[core] fix pedantic warning messages

This commit is contained in:
Konstantin Käfer
2016-06-03 18:05:04 +02:00
parent 9b6c2e6940
commit 2bdecdf9f9
41 changed files with 196 additions and 288 deletions

View File

@@ -197,4 +197,4 @@ void GlyphAtlas::bind(gl::ObjectStore& store) {
} else {
MBGL_CHECK_ERROR(glBindTexture(GL_TEXTURE_2D, *texture));
}
};
}

View File

@@ -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;
}
};
}

View File

@@ -1 +0,0 @@
#include <mbgl/map/camera.hpp>

View File

@@ -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) {

View File

@@ -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_)

View File

@@ -243,7 +243,7 @@ void SpriteAtlas::bind(bool linear, gl::ObjectStore& objectStore) {
// pixelWidth, pixelHeight, pixelWidth, pixelHeight);
#endif
}
};
}
SpriteAtlas::~SpriteAtlas() = default;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -1,3 +0,0 @@
#include <mbgl/tile/tile.hpp>
using namespace mbgl;

View File

@@ -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();

View File

@@ -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) {

View File

@@ -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];

View File

@@ -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];

View File

@@ -1 +0,0 @@
#include <mbgl/util/tile_coordinate.hpp>