Skip to content

Commit

Permalink
Pass corePlugins by const-reference in savegame.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 13, 2024
1 parent 10d5ba9 commit 7c02e42
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
16 changes: 11 additions & 5 deletions src/gamebryo/game_gamebryo_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,17 @@
<message>
<location filename="gamebryosavegameinfowidget.cpp" line="116"/>
<location filename="gamebryosavegameinfowidget.cpp" line="154"/>
<location filename="gamebryosavegameinfowidget.cpp" line="193"/>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegameinfowidget.cpp" line="122"/>
<source>Missing ESHs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegameinfowidget.cpp" line="161"/>
<source>Missing ESLs</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -136,27 +142,27 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegame.cpp" line="46"/>
<location filename="gamebryosavegame.cpp" line="48"/>
<source>%1, #%2, Level %3, %4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegame.cpp" line="100"/>
<location filename="gamebryosavegame.cpp" line="102"/>
<source>failed to open %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegame.cpp" line="110"/>
<location filename="gamebryosavegame.cpp" line="112"/>
<source>wrong file format - expected %1 got &apos;%2&apos; for %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamegamebryo.cpp" line="323"/>
<location filename="gamegamebryo.cpp" line="318"/>
<source>failed to query registry path (preflight): %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamegamebryo.cpp" line="331"/>
<location filename="gamegamebryo.cpp" line="326"/>
<source>failed to query registry path (read): %1</source>
<translation type="unfinished"></translation>
</message>
Expand Down
14 changes: 7 additions & 7 deletions src/gamebryo/gamebryosavegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ float_t GamebryoSaveGame::FileWrapper::readFloat(int bytesToIgnore)

QStringList GamebryoSaveGame::FileWrapper::readPlugins(int bytesToIgnore,
bool extraData,
const QStringList corePlugins)
const QStringList& corePlugins)
{
if (m_CompressionType == 0) {
if (bytesToIgnore > 0) // Just to make certain
Expand All @@ -528,9 +528,9 @@ QStringList GamebryoSaveGame::FileWrapper::readPlugins(int bytesToIgnore,
return {};
}

QStringList GamebryoSaveGame::FileWrapper::readLightPlugins(int bytesToIgnore,
bool extraData,
const QStringList corePlugins)
QStringList
GamebryoSaveGame::FileWrapper::readLightPlugins(int bytesToIgnore, bool extraData,
const QStringList& corePlugins)
{
if (m_CompressionType == 0) {
if (bytesToIgnore > 0) // Just to make certain
Expand All @@ -547,9 +547,9 @@ QStringList GamebryoSaveGame::FileWrapper::readLightPlugins(int bytesToIgnore,
return {};
}

QStringList GamebryoSaveGame::FileWrapper::readMediumPlugins(int bytesToIgnore,
bool extraData,
const QStringList corePlugins)
QStringList
GamebryoSaveGame::FileWrapper::readMediumPlugins(int bytesToIgnore, bool extraData,
const QStringList& corePlugins)
{
if (m_CompressionType != 1) {
return {};
Expand Down
6 changes: 3 additions & 3 deletions src/gamebryo/gamebryosavegame.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ class GamebryoSaveGame : public MOBase::ISaveGame

/* Read the plugin list */
QStringList readPlugins(int bytesToIgnore = 0, bool extraData = false,
const QStringList corePlugins = {});
const QStringList& corePlugins = {});

/* Read the light plugin list */
QStringList readLightPlugins(int bytesToIgnore = 0, bool extraData = false,
const QStringList corePlugins = {});
const QStringList& corePlugins = {});

/* Read the medium plugin list */
QStringList readMediumPlugins(int bytesToIgnore = 0, bool extraData = false,
const QStringList corePlugins = {});
const QStringList& corePlugins = {});

void close();

Expand Down

0 comments on commit 7c02e42

Please sign in to comment.