Skip to content

Commit

Permalink
Use shared_ptr for game features.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 1, 2024
1 parent 9ca84bc commit c208e13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/gamebryo/game_gamebryo_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegame.cpp" line="102"/>
<location filename="gamebryosavegame.cpp" line="101"/>
<source>failed to open %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamebryosavegame.cpp" line="112"/>
<location filename="gamebryosavegame.cpp" line="111"/>
<source>wrong file format - expected %1 got &apos;%2&apos; for %3</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/gamebryo/gamebryomoddatacontent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ std::vector<int> GamebryoModDataContent::getContentsFor(
}
}

auto* extender = m_GameFeatures->gameFeature<MOBase::ScriptExtender>();
auto extender = m_GameFeatures->gameFeature<MOBase::ScriptExtender>();
if (extender != nullptr) {
auto e = fileTree->findDirectory(extender->PluginPath());
if (e) {
Expand Down
3 changes: 1 addition & 2 deletions src/gamebryo/gamebryosavegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ QStringList GamebryoSaveGame::allFiles() const
{
// This returns all valid files associated with this game
QStringList res = {m_FileName};
auto const* e =
m_Game->m_Organizer->gameFeatures()->gameFeature<MOBase::ScriptExtender>();
auto e = m_Game->m_Organizer->gameFeatures()->gameFeature<MOBase::ScriptExtender>();
if (e != nullptr) {
QFileInfo file(m_FileName);
QFileInfo SEfile(file.absolutePath() + "/" + file.completeBaseName() + "." +
Expand Down

0 comments on commit c208e13

Please sign in to comment.