Check ESMReader value size in compile time

This commit is contained in:
elsid 2022-04-10 13:35:00 +02:00
parent d701a96a3c
commit 6b464a9330
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
35 changed files with 50 additions and 53 deletions

View file

@ -278,7 +278,7 @@ namespace ESSImport
while (esm.isNextSub("MPCD"))
{
float notepos[3];
esm.getHT(notepos, 3*sizeof(float));
esm.getHTSized<3 * sizeof(float)>(notepos);
// Markers seem to be arranged in a 32*32 grid, notepos has grid-indices.
// This seems to be the reason markers can't be placed everywhere in interior cells,

View file

@ -35,8 +35,8 @@ namespace ESSImport
// DATA should occur for all references, except levelled creature spawners
// I've seen DATA *twice* on a creature record, and with the exact same content too! weird
// alarmvoi0000.ess
esm.getHNOT(mPos, "DATA", 24);
esm.getHNOT(mPos, "DATA", 24);
esm.getHNOTSized<24>(mPos, "DATA");
esm.getHNOTSized<24>(mPos, "DATA");
mDeleted = 0;
if (esm.isNextSub("DELE"))

View file

@ -13,7 +13,7 @@ namespace ESSImport
mActorData.load(esm);
esm.getHNOT(mPos, "DATA", 24);
esm.getHNOTSized<24>(mPos, "DATA");
}
void PCDT::load(ESM::ESMReader &esm)