diff options
author | Max Horn | 2006-02-17 00:22:53 +0000 |
---|---|---|
committer | Max Horn | 2006-02-17 00:22:53 +0000 |
commit | 7967e30c731bdc21342ef10271578e2ac5b4e9bc (patch) | |
tree | ecb8fe39598810b33781aeddc0ba78e45dba961e /engines/sword2 | |
parent | a96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79 (diff) | |
download | scummvm-rg350-7967e30c731bdc21342ef10271578e2ac5b4e9bc.tar.gz scummvm-rg350-7967e30c731bdc21342ef10271578e2ac5b4e9bc.tar.bz2 scummvm-rg350-7967e30c731bdc21342ef10271578e2ac5b4e9bc.zip |
Added global toGameSettings() template function for convenience; simplified GameSettings usage in some engines
svn-id: r20739
Diffstat (limited to 'engines/sword2')
-rw-r--r-- | engines/sword2/sword2.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 5f4c11917e..a864ee9b79 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -51,10 +51,6 @@ struct Sword2GameSettings { const char *description; uint32 features; const char *detectname; - GameSettings toGameSettings() const { - GameSettings dummy = { gameid, description, features }; - return dummy; - } }; static const Sword2GameSettings sword2_settings[] = { @@ -69,7 +65,7 @@ GameList Engine_SWORD2_gameList() { const Sword2GameSettings *g = sword2_settings; GameList games; while (g->gameid) { - games.push_back(g->toGameSettings()); + games.push_back(toGameSettings(*g)); g++; } return games; @@ -91,7 +87,7 @@ DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) { if (0 == scumm_stricmp(g->detectname, gameName)) { // Match found, add to list of candidates, then abort inner loop. - detectedGames.push_back(g->toGameSettings()); + detectedGames.push_back(toGameSettings(*g)); break; } } |