SavegameData RAM usage reduced
This commit is contained in:
parent
a27e699cac
commit
443f90fbc9
2 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ SavegameData::SavegameData(const QString &fileName, QObject *parent) : QObject(p
|
||||||
{
|
{
|
||||||
// PARSE INT INIT - DO NOT CHANGE THIS VALUES
|
// PARSE INT INIT - DO NOT CHANGE THIS VALUES
|
||||||
savegameHeaderLength = 260;
|
savegameHeaderLength = 260;
|
||||||
verificationValue = QString::fromLatin1("00000001");
|
verificationValue = QByteArray::fromHex("00000001");
|
||||||
|
|
||||||
// INIT SAVEGAME
|
// INIT SAVEGAME
|
||||||
savegameStr = "";
|
savegameStr = "";
|
||||||
|
@ -57,7 +57,7 @@ bool SavegameData::readingSavegame()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QByteArray savegameHeaderLine = saveFile->read(savegameHeaderLength);
|
QByteArray savegameHeaderLine = saveFile->read(savegameHeaderLength);
|
||||||
if (QString::fromLatin1(savegameHeaderLine.left(4).toHex()) == verificationValue)
|
if (savegameHeaderLine.left(4) == verificationValue)
|
||||||
{
|
{
|
||||||
savegameStr = getSavegameDataString(savegameHeaderLine);
|
savegameStr = getSavegameDataString(savegameHeaderLine);
|
||||||
if (savegameStr.length() >= 1)
|
if (savegameStr.length() >= 1)
|
||||||
|
|
|
@ -41,7 +41,7 @@ private:
|
||||||
bool savegameOk;
|
bool savegameOk;
|
||||||
|
|
||||||
// PARSE INT
|
// PARSE INT
|
||||||
QString verificationValue;
|
QByteArray verificationValue;
|
||||||
int savegameHeaderLength;
|
int savegameHeaderLength;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue