From abe1959d36816b6c0703c1c3802764818585d0b6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 16 Nov 2010 08:23:13 +0000 Subject: COMMON: Simplify DECLARE_SINGLETON macro This makes it possible to write DECLARE_SINGLETON(foo); instead of DECLARE_SINGLETON(foo) without causing a warning about an extra semicolon. The extra semicolon helps some editors at parsing the C++ code. svn-id: r54258 --- graphics/cursorman.cpp | 2 +- graphics/font.h | 4 ++-- graphics/fontman.cpp | 15 +++++++-------- 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'graphics') diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp index 35e771b2f4..fe90545280 100644 --- a/graphics/cursorman.cpp +++ b/graphics/cursorman.cpp @@ -27,7 +27,7 @@ #include "common/system.h" #include "common/stack.h" -DECLARE_SINGLETON(Graphics::CursorManager) +DECLARE_SINGLETON(Graphics::CursorManager); namespace Graphics { diff --git a/graphics/font.h b/graphics/font.h index 0e65e9418c..101fd6eac6 100644 --- a/graphics/font.h +++ b/graphics/font.h @@ -149,10 +149,10 @@ public: #define FORWARD_DECLARE_FONT(n) \ extern const NewFont *n; \ - extern void create_##n(); + extern void create_##n() #define INIT_FONT(n) \ - create_##n(); + create_##n() } // End of namespace Graphics diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp index c6972cfaab..35ea14b199 100644 --- a/graphics/fontman.cpp +++ b/graphics/fontman.cpp @@ -23,16 +23,15 @@ */ #include "graphics/fontman.h" -//#include "gui/consolefont.h" -DECLARE_SINGLETON(Graphics::FontManager) +DECLARE_SINGLETON(Graphics::FontManager); namespace Graphics { const ScummFont *g_scummfont = 0; -FORWARD_DECLARE_FONT(g_sysfont) -FORWARD_DECLARE_FONT(g_sysfont_big) -FORWARD_DECLARE_FONT(g_consolefont) +FORWARD_DECLARE_FONT(g_sysfont); +FORWARD_DECLARE_FONT(g_sysfont_big); +FORWARD_DECLARE_FONT(g_consolefont); FontManager::FontManager() { // This assert should *never* trigger, because @@ -41,9 +40,9 @@ FontManager::FontManager() { // reset to 0 in the desctructor of this class). assert(g_scummfont == 0); g_scummfont = new ScummFont; - INIT_FONT(g_sysfont) - INIT_FONT(g_sysfont_big) - INIT_FONT(g_consolefont) + INIT_FONT(g_sysfont); + INIT_FONT(g_sysfont_big); + INIT_FONT(g_consolefont); } FontManager::~FontManager() { -- cgit v1.2.3