diff options
author | lloyd <[email protected]> | 2007-04-23 02:18:31 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-04-23 02:18:31 +0000 |
commit | cd5eb9de24a08684aeef0b3bd1594f5c34581ac6 (patch) | |
tree | f44ed286ec0279504c9a53fbc89f1eb5fc800e54 /src | |
parent | 59d4f6f7bbaf21d35d84fe1c2ab82e5d3abbd4cc (diff) |
Fixes for Visual C++ 2005; it wasn't picking up the needed conversion
from a void* to a Memory_Block, so call the constructor explicitly.
Diffstat (limited to 'src')
-rw-r--r-- | src/mem_pool.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem_pool.cpp b/src/mem_pool.cpp index cf64fc9af..0b5687481 100644 --- a/src/mem_pool.cpp +++ b/src/mem_pool.cpp @@ -207,7 +207,7 @@ 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(), ptr); + 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"); @@ -270,7 +270,8 @@ void Pooling_Allocator::get_more_core(u32bit in_bytes) } std::sort(blocks.begin(), blocks.end()); - last_used = std::lower_bound(blocks.begin(), blocks.end(), ptr); + last_used = std::lower_bound(blocks.begin(), blocks.end(), + Memory_Block(ptr)); } } |