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:
parent
4dad58b806
commit
6140c9c3fd
@ -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…
x
Reference in New Issue
Block a user