summaryrefslogtreecommitdiff
path: root/src/video/sdl_v.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/video/sdl_v.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/video/sdl_v.h')
-rw-r--r--src/video/sdl_v.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video/sdl_v.h b/src/video/sdl_v.h
index 66f8bf856..523129309 100644
--- a/src/video/sdl_v.h
+++ b/src/video/sdl_v.h
@@ -41,12 +41,10 @@ private:
};
/** Factory for the SDL video driver. */
-class FVideoDriver_SDL: public VideoDriverFactory<FVideoDriver_SDL> {
+class FVideoDriver_SDL : public DriverFactoryBase {
public:
- static const int priority = 5;
- /* virtual */ const char *GetName() { return "sdl"; }
- /* virtual */ const char *GetDescription() { return "SDL Video Driver"; }
- /* virtual */ Driver *CreateInstance() { return new VideoDriver_SDL(); }
+ FVideoDriver_SDL() : DriverFactoryBase(Driver::DT_VIDEO, 5, "sdl", "SDL Video Driver") {}
+ /* virtual */ Driver *CreateInstance() const { return new VideoDriver_SDL(); }
};
#endif /* VIDEO_SDL_H */