diff options
author | Max Horn | 2006-03-09 01:42:56 +0000 |
---|---|---|
committer | Max Horn | 2006-03-09 01:42:56 +0000 |
commit | d2f78184af00cd91f3f1f251199a436b53f4ae64 (patch) | |
tree | 140adfdc6fd1ae851a1093d4e2cf8056ae361b52 /base | |
parent | 0d4b1a2c8579b88f7ddcf252ab4a317fd6d2576b (diff) | |
download | scummvm-rg350-d2f78184af00cd91f3f1f251199a436b53f4ae64.tar.gz scummvm-rg350-d2f78184af00cd91f3f1f251199a436b53f4ae64.tar.bz2 scummvm-rg350-d2f78184af00cd91f3f1f251199a436b53f4ae64.zip |
- 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
Diffstat (limited to 'base')
-rw-r--r-- | base/plugins.h | 10 |
1 files changed, 8 insertions, 2 deletions
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 <class T> +DetectedGame toDetectedGame(const T &g) { + DetectedGame dummy(g.gameid, g.description); + return dummy; +} + + /** List of detected games. */ typedef Common::Array<DetectedGame> DetectedGameList; |