(svn r26107) -Codechange/cleanup: remove some coding bloat and simplify the driver factory instatiations
This commit is contained in:
@@ -41,25 +41,6 @@ public:
|
||||
virtual void SetVolume(byte vol) = 0;
|
||||
};
|
||||
|
||||
/** Base of the factory for the music drivers. */
|
||||
class MusicDriverFactoryBase: public DriverFactoryBase {
|
||||
};
|
||||
|
||||
/**
|
||||
* Factory for the music drivers.
|
||||
* @tparam T The type of the music factory to register.
|
||||
*/
|
||||
template <class T>
|
||||
class MusicDriverFactory: public MusicDriverFactoryBase {
|
||||
public:
|
||||
MusicDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_MUSIC, ((T *)this)->priority); }
|
||||
|
||||
/**
|
||||
* Get the long, human readable, name for the Driver-class.
|
||||
*/
|
||||
const char *GetName();
|
||||
};
|
||||
|
||||
extern MusicDriver *_music_driver;
|
||||
extern char *_ini_musicdriver;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user