aboutsummaryrefslogtreecommitdiffhomepage
path: root/goto.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-10 21:23:36 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-10 21:23:36 +0100
commit523947d30c5fb2e1a804023dcf7f1aa70a9a6932 (patch)
treef2d00d26b8f442df3ca52f7fc8342342e576057f /goto.cpp
parent9260afbf9f178bc67728f63222fa1279b1d98b94 (diff)
downloadsciteco-523947d30c5fb2e1a804023dcf7f1aa70a9a6932.tar.gz
use namespace "States" instead of "states" structure
has several advantages * better to read * namespace can be "extended" from everywhere allowing the declaration of states in the files that implement them * include file mess could be cleaned up a bit
Diffstat (limited to 'goto.cpp')
-rw-r--r--goto.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/goto.cpp b/goto.cpp
index a3b3dfa..fd47bcc 100644
--- a/goto.cpp
+++ b/goto.cpp
@@ -8,6 +8,10 @@
#include "undo.h"
#include "goto.h"
+namespace States {
+ StateLabel label;
+}
+
static gchar *skip_label = NULL;
class GotoTable {
@@ -196,7 +200,7 @@ StateLabel::custom(gchar chr)
g_free(strings[0]);
strings[0] = NULL;
- return &states.start;
+ return &States::start;
}
undo.push_str(strings[0]);