From 8a9e607d36b9b22cfb22002a3bbeb1bf86810337 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Thu, 9 Mar 2006 12:56:02 +0000 Subject: Made all local action listeners structs and moved them into anonymous namespaces. --- src/game.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 497cc903..a780c2d7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -120,14 +120,16 @@ const int MAX_TIME = 10000; /** * Listener used for exitting handling. */ -class ExitListener : public gcn::ActionListener { - void action(const std::string &eventId) { - if (eventId == "yes") { - done = true; +namespace { + struct ExitListener : public gcn::ActionListener { + void action(const std::string &eventId) { + if (eventId == "yes") { + done = true; + } + exitConfirm = NULL; } - exitConfirm = NULL; - } -} exitListener; + } exitListener; +} /** * Advances game logic counter. -- cgit v1.2.3-70-g09d2