summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 12:56:02 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 12:56:02 +0000
commit8a9e607d36b9b22cfb22002a3bbeb1bf86810337 (patch)
tree032f20fff6f1371548d279c7cfad8e550ca75128 /src/game.cpp
parent76185faa619fd06576f2e67e1f2d5f1fb659e340 (diff)
downloadmana-8a9e607d36b9b22cfb22002a3bbeb1bf86810337.tar.gz
mana-8a9e607d36b9b22cfb22002a3bbeb1bf86810337.tar.bz2
mana-8a9e607d36b9b22cfb22002a3bbeb1bf86810337.tar.xz
mana-8a9e607d36b9b22cfb22002a3bbeb1bf86810337.zip
Made all local action listeners structs and moved them into anonymous namespaces.
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.