Call std::terminate() instead of throwing in a destructor.

We don't catch this specific exception, so no behavioural change, but we
do no longer violate the implicit noexcept for destructors in C++11.
(Fixes a GCC6 and VS2015 warning.)

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D416
This was SVN commit r19612.
This commit is contained in:
leper 2017-05-19 17:48:43 +00:00
parent 3bebd1a21f
commit 7c88529b45

View File

@ -600,7 +600,7 @@ public:
const size_t cd_size = m_cdfhPool.da.pos;
ECDR* ecdr = (ECDR*)pool_alloc(&m_cdfhPool, sizeof(ECDR));
if(!ecdr)
throw std::bad_alloc();
std::terminate();
const off_t cd_ofs = m_fileSize;
ecdr->Init(m_numEntries, cd_ofs, cd_size);