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

@@ -20,8 +20,8 @@
namespace mbgl {
Source::Source(const util::ptr<SourceInfo>& info)
: info(info)
Source::Source(const util::ptr<SourceInfo>& info_)
: info(info_)
{
}
@@ -219,15 +219,15 @@ std::forward_list<Tile::ID> Source::coveringTiles(const TransformState& state) c
box points = state.cornersToBox(z);
const vec2<double>& center = points.center;
std::forward_list<Tile::ID> tiles = Tile::cover(z, points);
std::forward_list<Tile::ID> covering_tiles = Tile::cover(z, points);
tiles.sort([&center](const Tile::ID& a, const Tile::ID& b) {
covering_tiles.sort([&center](const Tile::ID& a, const Tile::ID& b) {
// Sorts by distance from the box center
return std::fabs(a.x - center.x) + std::fabs(a.y - center.y) <
std::fabs(b.x - center.x) + std::fabs(b.y - center.y);
});
return tiles;
return covering_tiles;
}
/**