Skip to content

Commit

Permalink
rename a struct which holds events context state
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Dec 14, 2014
1 parent 1c005cb commit 61c6161
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/game_events/pump.cpp
Expand Up @@ -388,8 +388,8 @@ namespace { // Support functions


// Static members of context.
context::event_context context::default_context_(false);
context::event_context *context::current_context_ = &default_context_;
context::state context::default_context_(false);
context::state *context::current_context_ = &default_context_;
bool context::rebuild_screen_ = false;


Expand Down
12 changes: 6 additions & 6 deletions src/game_events/pump.hpp
Expand Up @@ -51,11 +51,11 @@ namespace game_events
/// The general environment within which events are processed.
class context {
/// State when processing a particular flight of events or commands.
struct event_context {
struct state {
bool mutated;
bool skip_messages;

explicit event_context(bool s) : mutated(true), skip_messages(s) {}
explicit state(bool s) : mutated(true), skip_messages(s) {}
};

public:
Expand All @@ -66,8 +66,8 @@ namespace game_events
~scoped();

private:
context::event_context *old_context_;
context::event_context new_context_;
context::state *old_context_;
context::state new_context_;
};
friend class scoped;

Expand All @@ -88,10 +88,10 @@ namespace game_events
static void skip_messages(bool skip) { current_context_->skip_messages = skip; }

private:
static event_context * current_context_;
static state * current_context_;
static bool rebuild_screen_;
/// A default value used to avoid NULL pointers.
static event_context default_context_;
static state default_context_;
};


Expand Down

0 comments on commit 61c6161

Please sign in to comment.