From d2f78184af00cd91f3f1f251199a436b53f4ae64 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 9 Mar 2006 01:42:56 +0000 Subject: - added new toDetectedGame() template function (analog to toGameSettings) - made use of the new DetectedGame constructor from my last commit - some related cleanup svn-id: r21149 --- engines/saga/game.cpp | 10 ++++++---- engines/saga/saga.h | 5 ----- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp index 5a6ffd88b9..bc38a17179 100644 --- a/engines/saga/game.cpp +++ b/engines/saga/game.cpp @@ -1654,10 +1654,12 @@ DetectedGameList GAME_ProbeGame(const FSList &fslist, int **retmatches) { // and now push them into list of detected games for (i = 0; i < index; i++) - if (matches[i] != -1) - detectedGames.push_back(DetectedGame(gameDescriptions[matches[i]].toGameSettings(), - gameDescriptions[matches[i]].language, - gameDescriptions[matches[i]].platform)); + if (matches[i] != -1) { + GameDescription &g = gameDescriptions[matches[i]]; + detectedGames.push_back(DetectedGame(g.name, g.title, + g.language, + g.platform)); + } if (retmatches) { *retmatches = (int *)calloc(ARRAYSIZE(gameDescriptions), sizeof(int)); diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 2e2c1358f0..938b44e083 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -516,11 +516,6 @@ struct GameDescription { uint32 features; Common::Language language; Common::Platform platform; - - GameSettings toGameSettings() const { - GameSettings dummy = { name, title }; - return dummy; - } }; struct SaveFileData { -- cgit v1.2.3