fix variable shadowing
This commit is contained in:
@@ -98,10 +98,10 @@ const int8_t simplex_94[] = { 3, 6, 3, 8, 4, 11, 6, 12, 8, 12, 10, 11, 14, 8, 16
|
||||
|
||||
struct glyph {
|
||||
glyph() : width(0), length(0), data(nullptr) { }
|
||||
glyph(uint8_t width, uint8_t length, const int8_t *data)
|
||||
: width(width),
|
||||
length(length),
|
||||
data(data) {}
|
||||
glyph(uint8_t width_, uint8_t length_, const int8_t *data_)
|
||||
: width(width_),
|
||||
length(length_),
|
||||
data(data_) {}
|
||||
uint8_t width;
|
||||
uint8_t length;
|
||||
const int8_t *data;
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
using namespace mbgl;
|
||||
|
||||
GlyphAtlas::GlyphAtlas(uint16_t width, uint16_t height)
|
||||
: width(width),
|
||||
height(height),
|
||||
bin(width, height),
|
||||
data(new char[width *height]),
|
||||
GlyphAtlas::GlyphAtlas(uint16_t width_, uint16_t height_)
|
||||
: width(width_),
|
||||
height(height_),
|
||||
bin(width_, height_),
|
||||
data(new char[width_ *height_]),
|
||||
dirty(true) {
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
using namespace mbgl;
|
||||
|
||||
SpriteAtlas::SpriteAtlas(dimension width, dimension height)
|
||||
: width(width),
|
||||
height(height),
|
||||
bin(width, height),
|
||||
SpriteAtlas::SpriteAtlas(dimension width_, dimension height_)
|
||||
: width(width_),
|
||||
height(height_),
|
||||
bin(width_, height_),
|
||||
dirty(true) {
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ void copy_bitmap(const uint32_t *src, const int src_stride, const int src_x, con
|
||||
}
|
||||
}
|
||||
|
||||
Rect<SpriteAtlas::dimension> SpriteAtlas::allocateImage(size_t width, size_t height) {
|
||||
Rect<SpriteAtlas::dimension> SpriteAtlas::allocateImage(size_t pixel_width, size_t pixel_height) {
|
||||
// We have to allocate a new area in the bin, and store an empty image in it.
|
||||
// Add a 1px border around every image.
|
||||
Rect<dimension> rect = bin.allocate(width + 2 * buffer, height + 2 * buffer);
|
||||
Rect<dimension> rect = bin.allocate(pixel_width + 2 * buffer, pixel_height + 2 * buffer);
|
||||
if (rect.w == 0) {
|
||||
return rect;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user