Fixed GCC warning "declaration shadows a member" (issue #103)

This commit is contained in:
Benoit Blanchon
2015-09-01 22:26:51 +02:00
parent 5a4d993f7d
commit 04b8781c8d
3 changed files with 6 additions and 5 deletions

View File

@@ -76,8 +76,8 @@ class BlockJsonBuffer : public JsonBuffer {
}
bool addNewBlock(size_t capacity) {
size_t size = sizeof(EmptyBlock) + capacity;
Block* block = static_cast<Block*>(_allocator.allocate(size));
size_t bytes = sizeof(EmptyBlock) + capacity;
Block* block = static_cast<Block*>(_allocator.allocate(bytes));
if (block == NULL) return false;
block->capacity = capacity;
block->size = 0;