summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp16
1 files changed, 9 insertions, 7 deletions
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.