Merge branch 'dont_ctach' into 'master'

Don't catch exceptions in EsmReader::getExact

See merge request OpenMW/openmw!924
pull/3094/head
Evil Eye 4 years ago
commit 653114395d

@ -291,18 +291,6 @@ void ESMReader::getRecHeader(uint32_t &flags)
*
*************************************************************************/
void ESMReader::getExact(void*x, int size)
{
try
{
mEsm->read((char*)x, size);
}
catch (std::exception& e)
{
fail(std::string("Read error: ") + e.what());
}
}
std::string ESMReader::getString(int size)
{
size_t s = size;

@ -239,7 +239,7 @@ public:
template <typename X>
void getT(X &x) { getExact(&x, sizeof(X)); }
void getExact(void*x, int size);
void getExact(void* x, int size) { mEsm->read((char*)x, size); }
void getName(NAME &name) { getT(name); }
void getUint(uint32_t &u) { getT(u); }

Loading…
Cancel
Save