summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-11 15:16:06 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-12 20:42:29 +0300
commit3afbfa2de74d26f1d9099a85cc1b6ed70251666f (patch)
treebb71b54e4badf6d71932e31fa89e4c7348c7a0cd
parentf1ac757bd28351fd57113a1e16f6c2e00ab193c1 (diff)
downloadqtlocation-mapboxgl-3afbfa2de74d26f1d9099a85cc1b6ed70251666f.tar.gz
[core] GCC 4.9 shadow member warnings
-rw-r--r--include/mbgl/util/image.hpp6
-rw-r--r--platform/default/sqlite3.cpp4
-rw-r--r--platform/qt/src/qmapboxgl.cpp28
-rw-r--r--src/mbgl/renderer/possibly_evaluated_property_value.hpp2
-rw-r--r--src/mbgl/tile/geometry_tile.cpp6
-rw-r--r--test/src/mbgl/test/fake_file_source.hpp4
6 files changed, 25 insertions, 25 deletions
diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp
index 91bf06d727..cb28f3da8d 100644
--- a/include/mbgl/util/image.hpp
+++ b/include/mbgl/util/image.hpp
@@ -66,9 +66,9 @@ public:
template <typename T = Image>
T clone() const {
- T copy(size);
- std::copy(data.get(), data.get() + bytes(), copy.data.get());
- return copy;
+ T copy_(size);
+ std::copy(data.get(), data.get() + bytes(), copy_.data.get());
+ return copy_;
}
size_t stride() const { return channels * size.width; }
diff --git a/platform/default/sqlite3.cpp b/platform/default/sqlite3.cpp
index 0707f9255c..269c97716f 100644
--- a/platform/default/sqlite3.cpp
+++ b/platform/default/sqlite3.cpp
@@ -381,8 +381,8 @@ int64_t Statement::lastInsertRowId() const {
uint64_t Statement::changes() const {
assert(impl);
- auto changes = impl->changes;
- return (changes < 0 ? 0 : changes);
+ auto changes_ = impl->changes;
+ return (changes_ < 0 ? 0 : changes_);
}
Transaction::Transaction(Database& db_, Mode mode)
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index f094e2a0ec..295d14b5d3 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -426,13 +426,13 @@ void QMapboxGLSettings::setApiBaseUrl(const QString& url)
*/
/*!
- Constructs a QMapboxGL object with \a settings and sets \a parent as the parent
+ Constructs a QMapboxGL object with \a settings and sets \a parent_ as the parent
object. The \a settings cannot be changed after the object is constructed. The
\a size represents the size of the viewport and the \a pixelRatio the initial pixel
density of the screen.
*/
-QMapboxGL::QMapboxGL(QObject *parent, const QMapboxGLSettings &settings, const QSize& size, qreal pixelRatio)
- : QObject(parent)
+QMapboxGL::QMapboxGL(QObject *parent_, const QMapboxGLSettings &settings, const QSize& size, qreal pixelRatio)
+ : QObject(parent_)
{
assert(!size.isEmpty());
@@ -829,7 +829,7 @@ void QMapboxGL::removeAnnotation(QMapbox::AnnotationID id)
}
/*!
- Sets a layout \a property \a value to an existing \a layer. The \a property string can be any
+ Sets a layout \a property \a value to an existing \a layer. The \a property_ string can be any
as defined by the \l {https://www.mapbox.com/mapbox-gl-style-spec/} {Mapbox style specification}
for layout properties.
@@ -863,7 +863,7 @@ void QMapboxGL::removeAnnotation(QMapbox::AnnotationID id)
\li QVariantList
\endtable
*/
-void QMapboxGL::setLayoutProperty(const QString& layer, const QString& property, const QVariant& value)
+void QMapboxGL::setLayoutProperty(const QString& layer, const QString& property_, const QVariant& value)
{
using namespace mbgl::style;
@@ -873,14 +873,14 @@ void QMapboxGL::setLayoutProperty(const QString& layer, const QString& property,
return;
}
- if (conversion::setLayoutProperty(*layer_, property.toStdString(), value)) {
- qWarning() << "Error setting layout property:" << layer << "-" << property;
+ if (conversion::setLayoutProperty(*layer_, property_.toStdString(), value)) {
+ qWarning() << "Error setting layout property:" << layer << "-" << property_;
return;
}
}
/*!
- Sets a paint \a property \a value to an existing \a layer. The \a property string can be any
+ Sets a paint \a property_ \a value to an existing \a layer. The \a property string can be any
as defined by the \l {https://www.mapbox.com/mapbox-gl-style-spec/} {Mapbox style specification}
for paint properties.
@@ -929,7 +929,7 @@ void QMapboxGL::setLayoutProperty(const QString& layer, const QString& property,
map->setPaintProperty("route","line-dasharray", lineDashArray);
\endcode
*/
-void QMapboxGL::setPaintProperty(const QString& layer, const QString& property, const QVariant& value)
+void QMapboxGL::setPaintProperty(const QString& layer, const QString& property_, const QVariant& value)
{
using namespace mbgl::style;
@@ -939,8 +939,8 @@ void QMapboxGL::setPaintProperty(const QString& layer, const QString& property,
return;
}
- if (conversion::setPaintProperty(*layer_, property.toStdString(), value)) {
- qWarning() << "Error setting paint property:" << layer << "-" << property;
+ if (conversion::setPaintProperty(*layer_, property_.toStdString(), value)) {
+ qWarning() << "Error setting paint property:" << layer << "-" << property_;
return;
}
}
@@ -1033,11 +1033,11 @@ void QMapboxGL::addAnnotationIcon(const QString &name, const QImage &icon)
}
/*!
- Returns the amount of meters per pixel from a given \a latitude and \a zoom.
+ Returns the amount of meters per pixel from a given \a latitude_ and \a zoom_.
*/
-double QMapboxGL::metersPerPixelAtLatitude(double latitude, double zoom) const
+double QMapboxGL::metersPerPixelAtLatitude(double latitude_, double zoom_) const
{
- return mbgl::Projection::getMetersPerPixelAtLatitude(latitude, zoom);
+ return mbgl::Projection::getMetersPerPixelAtLatitude(latitude_, zoom_);
}
/*!
diff --git a/src/mbgl/renderer/possibly_evaluated_property_value.hpp b/src/mbgl/renderer/possibly_evaluated_property_value.hpp
index 8a5dfbe4ea..e662d5dfb1 100644
--- a/src/mbgl/renderer/possibly_evaluated_property_value.hpp
+++ b/src/mbgl/renderer/possibly_evaluated_property_value.hpp
@@ -45,7 +45,7 @@ public:
template <class Feature>
T evaluate(const Feature& feature, float zoom, T defaultValue) const {
return this->match(
- [&] (const T& constant) { return constant; },
+ [&] (const T& constant_) { return constant_; },
[&] (const style::SourceFunction<T>& function) {
return function.evaluate(feature, defaultValue);
},
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp
index 1ee303b50f..4f1bc9e759 100644
--- a/src/mbgl/tile/geometry_tile.cpp
+++ b/src/mbgl/tile/geometry_tile.cpp
@@ -174,18 +174,18 @@ void GeometryTile::getImages(ImageDependencies imageDependencies) {
}
void GeometryTile::upload(gl::Context& context) {
- auto upload = [&] (Bucket& bucket) {
+ auto uploadFn = [&] (Bucket& bucket) {
if (bucket.needsUpload()) {
bucket.upload(context);
}
};
for (auto& entry : nonSymbolBuckets) {
- upload(*entry.second);
+ uploadFn(*entry.second);
}
for (auto& entry : symbolBuckets) {
- upload(*entry.second);
+ uploadFn(*entry.second);
}
if (glyphAtlasImage) {
diff --git a/test/src/mbgl/test/fake_file_source.hpp b/test/src/mbgl/test/fake_file_source.hpp
index 3ed3f90a17..baae7f9b7e 100644
--- a/test/src/mbgl/test/fake_file_source.hpp
+++ b/test/src/mbgl/test/fake_file_source.hpp
@@ -42,8 +42,8 @@ public:
}
bool respond(Resource::Kind kind, const Response& response) {
- auto it = std::find_if(requests.begin(), requests.end(), [&] (FakeFileRequest* request) {
- return request->resource.kind == kind;
+ auto it = std::find_if(requests.begin(), requests.end(), [&] (FakeFileRequest* fakeRequest) {
+ return fakeRequest->resource.kind == kind;
});
if (it != requests.end()) {