summaryrefslogtreecommitdiff
path: root/src/music/dmusic.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-25 14:26:46 +0000
committerrubidium <rubidium@openttd.org>2013-11-25 14:26:46 +0000
commit6996b441d9d104bc6d7041b64362f4426425f600 (patch)
tree074989fd03a7f672e137423688c40d1efc466a95 /src/music/dmusic.h
parenta399fc667ce506abcdcfd853d1ad58f0bb8dbb4f (diff)
downloadopenttd-6996b441d9d104bc6d7041b64362f4426425f600.tar.xz
(svn r26107) -Codechange/cleanup: remove some coding bloat and simplify the driver factory instatiations
Diffstat (limited to 'src/music/dmusic.h')
-rw-r--r--src/music/dmusic.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/music/dmusic.h b/src/music/dmusic.h
index 29eee8ed0..22a758daf 100644
--- a/src/music/dmusic.h
+++ b/src/music/dmusic.h
@@ -34,12 +34,10 @@ public:
};
/** Factory for the DirectX music player. */
-class FMusicDriver_DMusic: public MusicDriverFactory<FMusicDriver_DMusic> {
+class FMusicDriver_DMusic : public DriverFactoryBase {
public:
- static const int priority = 10;
- /* virtual */ const char *GetName() { return "dmusic"; }
- /* virtual */ const char *GetDescription() { return "DirectMusic MIDI Driver"; }
- /* virtual */ Driver *CreateInstance() { return new MusicDriver_DMusic(); }
+ FMusicDriver_DMusic() : DriverFactoryBase(Driver::DT_MUSIC, 10, "dmusic", "DirectMusic MIDI Driver") {}
+ /* virtual */ Driver *CreateInstance() const { return new MusicDriver_DMusic(); }
};
#endif /* MUSIC_DMUSIC_H */