remove some now unused code

This commit is contained in:
gfgtdf 2017-02-24 00:45:38 +01:00
parent 532e4c7de6
commit 41c4ecbe7d
3 changed files with 0 additions and 24 deletions

View file

@ -967,11 +967,6 @@ WML_HANDLER_FUNCTION(on_undo, event_info, cfg)
WML_HANDLER_FUNCTION(on_redo, event_info, cfg)
{
if(cfg["delayed_variable_substitution"].to_bool(false)) {
synced_context::add_redo_commands(cfg.get_config(), event_info);
} else {
synced_context::add_redo_commands(cfg.get_parsed_config(), event_info);
}
}
} // end namespace game_events

View file

@ -51,7 +51,6 @@ static lg::log_domain log_replay("replay");
synced_context::synced_state synced_context::state_ = synced_context::UNSYNCED;
int synced_context::last_unit_id_ = 0;
synced_context::event_list synced_context::undo_commands_;
synced_context::event_list synced_context::redo_commands_;
bool synced_context::is_simultaneously_ = false;
bool synced_context::run(const std::string& commandname, const config& data, bool use_undo, bool show, synced_command::error_handler_function error_handler)
@ -371,21 +370,11 @@ void synced_context::add_undo_commands(const config& commands, const game_events
undo_commands_.emplace_front(commands, ctx);
}
void synced_context::add_redo_commands(const config& commands, const game_events::queued_event& ctx)
{
redo_commands_.emplace_front(commands, ctx);
}
void synced_context::reset_undo_commands()
{
undo_commands_.clear();
}
void synced_context::reset_redo_commands()
{
redo_commands_.clear();
}
set_scontext_synced_base::set_scontext_synced_base()
: new_rng_(synced_context::get_rng_for_action())
, old_rng_(random_new::generator)
@ -397,7 +386,6 @@ set_scontext_synced_base::set_scontext_synced_base()
synced_context::reset_is_simultaneously();
synced_context::set_last_unit_id(resources::gameboard->unit_id_manager().get_save_id());
synced_context::reset_undo_commands();
synced_context::reset_redo_commands();
old_rng_ = random_new::generator;
random_new::generator = new_rng_.get();
}

View file

@ -148,11 +148,8 @@ public:
typedef std::deque<std::pair<config,game_events::queued_event>> event_list;
static event_list& get_undo_commands() { return undo_commands_; }
static event_list& get_redo_commands() { return redo_commands_; }
static void add_undo_commands(const config& commands, const game_events::queued_event& ctx);
static void add_redo_commands(const config& commands, const game_events::queued_event& ctx);
static void reset_undo_commands();
static void reset_redo_commands();
private:
/*
weather we are in a synced move, in a user_choice, or none of them
@ -175,10 +172,6 @@ private:
Actions wml to be executed when the current actio is undone.
*/
static event_list undo_commands_;
/**
Actions wml to be executed when the current actio is redone.
*/
static event_list redo_commands_;
};