mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Improve a bit two esmreader logging call
This commit is contained in:
parent
c264c307a4
commit
7b32458aec
@ -125,8 +125,7 @@ void ESMReader::getHExact(void*p, int size)
|
||||
{
|
||||
getSubHeader();
|
||||
if (size != static_cast<int> (mCtx.leftSub))
|
||||
fail("Size mismatch, requested " + std::to_string(size) + " but got "
|
||||
+ std::to_string(mCtx.leftSub));
|
||||
reportSubSizeMismatch(size, mCtx.leftSub);
|
||||
getExact(p, size);
|
||||
}
|
||||
|
||||
@ -264,7 +263,7 @@ void ESMReader::getRecHeader(uint32_t &flags)
|
||||
|
||||
// Check that sizes add up
|
||||
if (mCtx.leftFile < mCtx.leftRec)
|
||||
fail("Record size is larger than rest of file");
|
||||
reportSubSizeMismatch(mCtx.leftFile, mCtx.leftRec);
|
||||
|
||||
// Adjust number of bytes mCtx.left in file
|
||||
mCtx.leftFile -= mCtx.leftRec;
|
||||
|
@ -258,7 +258,7 @@ public:
|
||||
|
||||
private:
|
||||
[[noreturn]] void reportSubSizeMismatch(size_t want, size_t got) {
|
||||
fail("subrecord size mismatch, requested " +
|
||||
fail("record size mismatch, requested " +
|
||||
std::to_string(want) +
|
||||
", got" +
|
||||
std::to_string(got));
|
||||
|
Loading…
Reference in New Issue
Block a user