1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Remove dead code from commit 024ad3276b472e0fc58b681d10566917e4d8d44d.

This commit is contained in:
cc9cii 2021-07-06 14:21:17 +10:00
parent ec457a09c3
commit fea1ac2c0f
4 changed files with 9 additions and 17 deletions

View File

@ -31,10 +31,10 @@ void ESM::RefNum::save (ESMWriter &esm, bool wide, const std::string& tag) const
} }
void ESM::CellRef::load (ESMReader& esm, bool &isDeleted, int *tempRefCount, bool wideRefNum) void ESM::CellRef::load (ESMReader& esm, bool &isDeleted, bool wideRefNum)
{ {
loadId(esm, wideRefNum); loadId(esm, wideRefNum);
loadData(esm, isDeleted, tempRefCount); loadData(esm, isDeleted);
} }
void ESM::CellRef::loadId (ESMReader& esm, bool wideRefNum) void ESM::CellRef::loadId (ESMReader& esm, bool wideRefNum)
@ -57,7 +57,7 @@ void ESM::CellRef::loadId (ESMReader& esm, bool wideRefNum)
} }
} }
void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted, int *tempRefCount) void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted)
{ {
isDeleted = false; isDeleted = false;
@ -119,14 +119,7 @@ void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted, int *tempRefCount)
break; break;
case ESM::FourCC<'N','A','M','0'>::value: case ESM::FourCC<'N','A','M','0'>::value:
{ {
if (tempRefCount && *tempRefCount == -1) esm.skipHSub();
{
esm.getHT(*tempRefCount);
// TODO: check that there are no more subs following this sub
}
else
esm.skipHSub();
break; break;
} }
case ESM::SREC_DELE: case ESM::SREC_DELE:

View File

@ -107,12 +107,12 @@ namespace ESM
Position mPos; Position mPos;
/// Calls loadId and loadData /// Calls loadId and loadData
void load (ESMReader& esm, bool &isDeleted, int *tempRefCount, bool wideRefNum = false); void load (ESMReader& esm, bool &isDeleted, bool wideRefNum = false);
void loadId (ESMReader& esm, bool wideRefNum = false); void loadId (ESMReader& esm, bool wideRefNum = false);
/// Implicitly called by load /// Implicitly called by load
void loadData (ESMReader& esm, bool &isDeleted, int *tempRefCount = nullptr); void loadData (ESMReader& esm, bool &isDeleted);
void save (ESMWriter &esm, bool wideRefNum = false, bool inInventory = false, bool isDeleted = false) const; void save (ESMWriter &esm, bool wideRefNum = false, bool inInventory = false, bool isDeleted = false) const;

View File

@ -224,7 +224,7 @@ namespace ESM
return region + ' ' + cellGrid; return region + ' ' + cellGrid;
} }
bool Cell::getNextRef(ESMReader &esm, CellRef &ref, bool &isDeleted, int *tempRefCount, bool ignoreMoves, MovedCellRef *mref) bool Cell::getNextRef(ESMReader &esm, CellRef &ref, bool &isDeleted, bool ignoreMoves, MovedCellRef *mref)
{ {
isDeleted = false; isDeleted = false;
@ -252,7 +252,7 @@ namespace ESM
if (esm.peekNextSub("FRMR")) if (esm.peekNextSub("FRMR"))
{ {
ref.load (esm, isDeleted, tempRefCount); ref.load (esm, isDeleted);
// TODO: should count the number of temp refs and validate the number // TODO: should count the number of temp refs and validate the number

View File

@ -184,8 +184,7 @@ struct Cell
/// \param ignoreMoves ignore MVRF record and read reference like a regular CellRef. /// \param ignoreMoves ignore MVRF record and read reference like a regular CellRef.
static bool getNextRef(ESMReader &esm, static bool getNextRef(ESMReader &esm,
CellRef &ref, CellRef &ref,
bool &isDeleted, bool &isDeleted,
int *tempRefCount = nullptr,
bool ignoreMoves = false, bool ignoreMoves = false,
MovedCellRef *mref = nullptr); MovedCellRef *mref = nullptr);