From 7967e30c731bdc21342ef10271578e2ac5b4e9bc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 17 Feb 2006 00:22:53 +0000 Subject: Added global toGameSettings() template function for convenience; simplified GameSettings usage in some engines svn-id: r20739 --- engines/sword2/sword2.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/sword2') 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; } } -- cgit v1.2.3