From b9d6454c30a258e6dbb828dcd43ef0fd58f89806 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 18 Feb 2013 21:35:45 +0000 Subject: [PATCH] base: prevent instantiation of several static-only classes. --- src/audio.h | 3 +++ src/forge.h | 3 +++ src/platform.h | 3 +++ src/profiler.h | 3 +++ src/ticker.h | 3 +++ src/tiler.h | 3 +++ 6 files changed, 18 insertions(+) diff --git a/src/audio.h b/src/audio.h index f1cbee06..d2f99bd1 100644 --- a/src/audio.h +++ b/src/audio.h @@ -26,6 +26,9 @@ class Audio { public: static void Setup(int channels); + +private: + Audio() {} }; } /* namespace lol */ diff --git a/src/forge.h b/src/forge.h index bbf279b8..390e50fc 100644 --- a/src/forge.h +++ b/src/forge.h @@ -28,6 +28,9 @@ public: static int Register(char const *path); static void Deregister(int id); static Font *GetFont(int id); + +private: + Forge() {} }; } /* namespace lol */ diff --git a/src/platform.h b/src/platform.h index a5043cfd..afe9bf8d 100644 --- a/src/platform.h +++ b/src/platform.h @@ -26,6 +26,9 @@ class Platform { public: static int GetMouseCount(); + +private: + Platform() {} }; } /* namespace lol */ diff --git a/src/profiler.h b/src/profiler.h index 27a1a5ce..4a035142 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -48,6 +48,9 @@ public: static void Stop(int id); static float GetAvg(int id); static float GetMax(int id); + +private: + Profiler() {} }; } /* namespace lol */ diff --git a/src/ticker.h b/src/ticker.h index dc6bb5e3..a442abd2 100644 --- a/src/ticker.h +++ b/src/ticker.h @@ -45,6 +45,9 @@ public: static void Shutdown(); static int Finished(); + +private: + Ticker() {} }; } /* namespace lol */ diff --git a/src/tiler.h b/src/tiler.h index dbe2bd9b..675db1de 100644 --- a/src/tiler.h +++ b/src/tiler.h @@ -29,6 +29,9 @@ class Tiler public: static TileSet *Register(char const *path, ivec2 size, ivec2 count); static void Deregister(TileSet *); + +private: + Tiler() {} }; } /* namespace lol */