| 128 | } |
| 129 | |
| 130 | char* stack_allocator::ptr(allocation_slot const idx) |
| 131 | { |
| 132 | static char tmp = 0; |
| 133 | if(!idx.is_valid()) return &tmp; |
| 134 | TORRENT_ASSERT(idx.val() < m_storage.size()); |
| 135 | return &m_storage[idx.val()]; |
| 136 | } |
| 137 | |
| 138 | char const* stack_allocator::ptr(allocation_slot const idx) const |
| 139 | { |