mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
Merge branch 'dont_ctach' into 'master'
Don't catch exceptions in EsmReader::getExact See merge request OpenMW/openmw!924
This commit is contained in:
commit
653114395d
2 changed files with 1 additions and 13 deletions
|
@ -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)
|
std::string ESMReader::getString(int size)
|
||||||
{
|
{
|
||||||
size_t s = size;
|
size_t s = size;
|
||||||
|
|
|
@ -239,7 +239,7 @@ public:
|
||||||
template <typename X>
|
template <typename X>
|
||||||
void getT(X &x) { getExact(&x, sizeof(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 getName(NAME &name) { getT(name); }
|
||||||
void getUint(uint32_t &u) { getT(u); }
|
void getUint(uint32_t &u) { getT(u); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue