aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/mem_pool/mem_pool.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-16 17:07:38 +0000
committerlloyd <[email protected]>2009-11-16 17:07:38 +0000
commit22a47e97f459337ff8c2b9fdcf68cb1514b19b34 (patch)
tree3eacf8d877eb0f3c6bc19f0b1995bedea224591c /src/alloc/mem_pool/mem_pool.cpp
parentfc5fadb281c509855a0ae20ecc70bfe9d681a1af (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/mem_pool.cpp')
-rw-r--r--src/alloc/mem_pool/mem_pool.cpp6
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
{