1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Don't catch exceptions in EsmReader::getExact

This commit is contained in:
jvoisin 2021-06-21 20:06:45 +00:00 committed by Evil Eye
parent 4dad58b806
commit 6140c9c3fd
2 changed files with 1 additions and 13 deletions

View File

@ -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;

View File

@ -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); }