diff options
author | lloyd <[email protected]> | 2009-11-16 17:07:38 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-16 17:07:38 +0000 |
commit | 22a47e97f459337ff8c2b9fdcf68cb1514b19b34 (patch) | |
tree | 3eacf8d877eb0f3c6bc19f0b1995bedea224591c /src/alloc/mem_pool | |
parent | fc5fadb281c509855a0ae20ecc70bfe9d681a1af (diff) |
Use auto for long iterator names, etc.
It will be nice to convert to the range-based for loop once that's available.
Diffstat (limited to 'src/alloc/mem_pool')
-rw-r--r-- | src/alloc/mem_pool/mem_pool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/alloc/mem_pool/mem_pool.cpp b/src/alloc/mem_pool/mem_pool.cpp index 02a12d6a5..820355678 100644 --- a/src/alloc/mem_pool/mem_pool.cpp +++ b/src/alloc/mem_pool/mem_pool.cpp @@ -190,8 +190,8 @@ void Pooling_Allocator::deallocate(void* ptr, u32bit n) { const u32bit block_no = round_up(n, BLOCK_SIZE) / BLOCK_SIZE; - std::vector<Memory_Block>::iterator i = - std::lower_bound(blocks.begin(), blocks.end(), Memory_Block(ptr)); + auto i = std::lower_bound(blocks.begin(), blocks.end(), + Memory_Block(ptr)); if(i == blocks.end() || !i->contains(ptr, block_no)) throw Invalid_State("Pointer released to the wrong allocator"); @@ -208,7 +208,7 @@ byte* Pooling_Allocator::allocate_blocks(u32bit n) if(blocks.empty()) return 0; - std::vector<Memory_Block>::iterator i = last_used; + auto i = last_used; do { |