diff options
author | rubidium <rubidium@openttd.org> | 2013-11-25 14:26:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-25 14:26:46 +0000 |
commit | 6996b441d9d104bc6d7041b64362f4426425f600 (patch) | |
tree | 074989fd03a7f672e137423688c40d1efc466a95 /src/music/allegro_m.h | |
parent | a399fc667ce506abcdcfd853d1ad58f0bb8dbb4f (diff) | |
download | openttd-6996b441d9d104bc6d7041b64362f4426425f600.tar.xz |
(svn r26107) -Codechange/cleanup: remove some coding bloat and simplify the driver factory instatiations
Diffstat (limited to 'src/music/allegro_m.h')
-rw-r--r-- | src/music/allegro_m.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/music/allegro_m.h b/src/music/allegro_m.h index 2160c396e..e7cade350 100644 --- a/src/music/allegro_m.h +++ b/src/music/allegro_m.h @@ -32,20 +32,18 @@ public: }; /** Factory for allegro's music player. */ -class FMusicDriver_Allegro: public MusicDriverFactory<FMusicDriver_Allegro> { +class FMusicDriver_Allegro : public DriverFactoryBase { public: #if !defined(WITH_SDL) && defined(WITH_ALLEGRO) /* If SDL is not compiled in but Allegro is, chances are quite big * that Allegro is going to be used. Then favour this sound driver * over extmidi because with extmidi we get crashes. */ - static const int priority = 9; + static const int PRIORITY = 9; #else - static const int priority = 2; + static const int PRIORITY = 2; #endif - - /* virtual */ const char *GetName() { return "allegro"; } - /* virtual */ const char *GetDescription() { return "Allegro MIDI Driver"; } - /* virtual */ Driver *CreateInstance() { return new MusicDriver_Allegro(); } + FMusicDriver_Allegro() : DriverFactoryBase(Driver::DT_MUSIC, PRIORITY, "allegro", "Allegro MIDI Driver") {} + /* virtual */ Driver *CreateInstance() const { return new MusicDriver_Allegro(); } }; #endif /* MUSIC_ALLEGRO_H */ |