summaryrefslogtreecommitdiff
path: root/src/video/dedicated_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/dedicated_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/dedicated_v.h')
-rw-r--r--src/video/dedicated_v.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video/dedicated_v.h b/src/video/dedicated_v.h
index 7d449d159..24d647fef 100644
--- a/src/video/dedicated_v.h
+++ b/src/video/dedicated_v.h
@@ -33,18 +33,17 @@ public:
};
/** Factory for the dedicated server video driver. */
-class FVideoDriver_Dedicated: public VideoDriverFactory<FVideoDriver_Dedicated> {
+class FVideoDriver_Dedicated : public DriverFactoryBase {
public:
#ifdef DEDICATED
/* Automatically select this dedicated driver when making a dedicated
* server build. */
- static const int priority = 10;
+ static const int PRIORITY = 10;
#else
- static const int priority = 0;
+ static const int PRIORITY = 0;
#endif
- /* virtual */ const char *GetName() { return "dedicated"; }
- /* virtual */ const char *GetDescription() { return "Dedicated Video Driver"; }
- /* virtual */ Driver *CreateInstance() { return new VideoDriver_Dedicated(); }
+ FVideoDriver_Dedicated() : DriverFactoryBase(Driver::DT_VIDEO, PRIORITY, "dedicated", "Dedicated Video Driver") {}
+ /* virtual */ Driver *CreateInstance() const { return new VideoDriver_Dedicated(); }
};
#endif /* VIDEO_DEDICATED_H */