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 --- base/plugins.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'base/plugins.h') diff --git a/base/plugins.h b/base/plugins.h index 179f2cf991..4ac93baaf3 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -46,8 +46,7 @@ struct DetectedGame { const char *description; Common::Language language; Common::Platform platform; - DetectedGame() : language(Common::UNK_LANG), platform(Common::kPlatformUnknown) {} - DetectedGame(const char *g, const char *d, + DetectedGame(const char *g = 0, const char *d = 0, Common::Language l = Common::UNK_LANG, Common::Platform p = Common::kPlatformUnknown) : gameid(g), description(d), language(l), platform(p) {} @@ -57,6 +56,13 @@ struct DetectedGame { : gameid(game.gameid), description(game.description), language(l), platform(p) {} }; +template +DetectedGame toDetectedGame(const T &g) { + DetectedGame dummy(g.gameid, g.description); + return dummy; +} + + /** List of detected games. */ typedef Common::Array DetectedGameList; -- cgit v1.2.3