diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-10 21:23:36 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-10 21:23:36 +0100 |
commit | 523947d30c5fb2e1a804023dcf7f1aa70a9a6932 (patch) | |
tree | f2d00d26b8f442df3ca52f7fc8342342e576057f /qbuffers.cpp | |
parent | 9260afbf9f178bc67728f63222fa1279b1d98b94 (diff) | |
download | sciteco-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 'qbuffers.cpp')
-rw-r--r-- | qbuffers.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qbuffers.cpp b/qbuffers.cpp index 289683a..d9eba9f 100644 --- a/qbuffers.cpp +++ b/qbuffers.cpp @@ -15,6 +15,10 @@ #include "expressions.h" #include "qbuffers.h" +namespace States { + StateFile file; +} + Ring ring; bool @@ -159,7 +163,7 @@ StateFile::initial(void) State * StateFile::done(const gchar *str) { - BEGIN_EXEC(&states.start); + BEGIN_EXEC(&States::start); if (is_glob_pattern(str)) { gchar *dirname; @@ -197,5 +201,5 @@ StateFile::done(const gchar *str) do_edit(*str ? str : NULL); } - return &states.start; + return &States::start; } |