[core] GCC 4.9 shadow member warnings
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user