Fix unreachable code warning

This commit is contained in:
Ion Gaztañaga
2020-08-09 23:23:26 +02:00
parent b946b779e6
commit 52aae65fcd

View File

@@ -142,15 +142,12 @@ class expand_bwd_test_allocator
reuse = 0;
return (mp_buffer + m_offset);
}
else if(m_allocations == 1){
if(limit_size > m_size){
assert(0);
}
++m_allocations;
return mp_buffer;
}
else{
if(m_allocations != 1){
throw_bad_alloc();
}
assert(limit_size <= m_size);
++m_allocations;
return mp_buffer;
}
}