Pass corePlugins by const-reference in savegame.

This commit is contained in:
Mikaël Capelle
2024-06-13 17:44:13 +02:00
parent 10d5ba990e
commit 7c02e42801
3 changed files with 21 additions and 15 deletions
+11 -5
View File
@@ -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>
@@ -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>
+7 -7
View File
@@ -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
@@ -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
@@ -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 {};
+3 -3
View File
@@ -168,15 +168,15 @@ protected:
/* 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();