From 643c24db75797728087999abd8acf1ecc83757fa Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 6 May 2018 13:09:52 +0200 Subject: ENGINES: Change MetaEngine::listSupportedGames to return plain game descriptors --- engines/game.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'engines/game.h') diff --git a/engines/game.h b/engines/game.h index 88033dcf09..a5cc4de4ec 100644 --- a/engines/game.h +++ b/engines/game.h @@ -50,6 +50,18 @@ struct PlainGameDescriptor { */ const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list); +class PlainGameList : public Common::Array { +public: + PlainGameList() {} + PlainGameList(const PlainGameList &list) : Common::Array(list) {} + PlainGameList(const PlainGameDescriptor *g) { + while (g->gameId) { + push_back(*g); + g++; + } + } +}; + /** * Ths is an enum to describe how done a game is. This also indicates what level of support is expected. */ @@ -106,17 +118,7 @@ public: }; /** List of games. */ -class GameList : public Common::Array { -public: - GameList() {} - GameList(const GameList &list) : Common::Array(list) {} - GameList(const PlainGameDescriptor *g) { - while (g->gameId) { - push_back(GameDescriptor(*g)); - g++; - } - } -}; +typedef Common::Array GameList; /** * A record describing the properties of a file. Used on the existing -- cgit v1.2.3