fix variable shadowing

This commit is contained in:
Konstantin Käfer
2014-10-22 18:06:11 +02:00
parent 74387c54e3
commit 214f99673f
60 changed files with 276 additions and 278 deletions

View File

@@ -19,11 +19,11 @@ Box getBox(const CollisionAnchor &anchor, const CollisionRect &bbox, float minSc
};
};
Collision::Collision(float zoom, float tileExtent, float tileSize, float placementDepth)
Collision::Collision(float zoom_, float tileExtent, float tileSize, float placementDepth)
// tile pixels per screen pixels at the tile's zoom level
: tilePixelRatio(tileExtent / tileSize),
zoom(zoom),
zoom(zoom_),
// Calculate the maximum scale we can go down in our fake-3d rtree so that
// placement still makes sense. This is calculated so that the minimum
@@ -33,7 +33,7 @@ Collision::Collision(float zoom, float tileExtent, float tileSize, float placeme
// We don't want to place labels all the way to 25.5. This lets too many
// glyphs be placed, slowing down collision checking. Only place labels if
// they will show up within the intended zoom range of the tile.
maxPlacementScale(std::exp(std::log(2) * util::min(3.0f, placementDepth, 25.5f - zoom))) {
maxPlacementScale(std::exp(std::log(2) * util::min(3.0f, placementDepth, 25.5f - zoom_))) {
const float m = 4096;
const float edge = m * tilePixelRatio * 2;

View File

@@ -228,7 +228,7 @@ void GlyphPBF::parse(FontStack &stack) {
data.clear();
}
GlyphStore::GlyphStore(const util::ptr<FileSource> &fileSource) : fileSource(fileSource) {}
GlyphStore::GlyphStore(const util::ptr<FileSource> &fileSource_) : fileSource(fileSource_) {}
void GlyphStore::setURL(const std::string &url) {
glyphURL = url;

View File

@@ -12,10 +12,10 @@ namespace mbgl {
const float Placement::globalMinScale = 0.5; // underscale by 1 zoom level
struct GlyphInstance {
explicit GlyphInstance(const vec2<float> &anchor) : anchor(anchor) {}
explicit GlyphInstance(const vec2<float> &anchor, float offset, float minScale, float maxScale,
float angle)
: anchor(anchor), offset(offset), minScale(minScale), maxScale(maxScale), angle(angle) {}
explicit GlyphInstance(const vec2<float> &anchor_) : anchor(anchor_) {}
explicit GlyphInstance(const vec2<float> &anchor_, float offset_, float minScale_, float maxScale_,
float angle_)
: anchor(anchor_), offset(offset_), minScale(minScale_), maxScale(maxScale_), angle(angle_) {}
const vec2<float> anchor;
const float offset = 0.0f;