Remove an unused parameter.

This commit is contained in:
Mark de Wever 2009-07-18 15:10:49 +00:00
parent fbb88d3cc6
commit a5973f35c3
6 changed files with 12 additions and 12 deletions

View File

@ -1453,7 +1453,7 @@ WML_HANDLER_FUNCTION(set_variable, /*event_info*/, cfg)
const int side = lexical_cast_default<int>(side_str.base_str(), -1); const int side = lexical_cast_default<int>(side_str.base_str(), -1);
do_replay_handle(*resources::screen, *resources::game_map, *resources::units, *resources::teams, do_replay_handle(*resources::screen, *resources::game_map, *resources::units, *resources::teams,
side , *resources::tod_manager, *resources::state_of_game, *resources::controller, "random_number"); side, *resources::state_of_game, *resources::controller, "random_number");
const config* const action = get_replay_source().get_next_action(); const config* const action = get_replay_source().get_next_action();
if(action == NULL || action->get_children("random_number").empty()) { if(action == NULL || action->get_children("random_number").empty()) {
replay::throw_error("random_number expected but none found\n"); replay::throw_error("random_number expected but none found\n");
@ -3224,7 +3224,7 @@ WML_HANDLER_FUNCTION(message, event_info, cfg)
if(!options.empty()) { if(!options.empty()) {
do_replay_handle(*resources::screen, *resources::game_map, *resources::units, *resources::teams, do_replay_handle(*resources::screen, *resources::game_map, *resources::units, *resources::teams,
side , *resources::tod_manager, *resources::state_of_game, *resources::controller, "choose"); side, *resources::state_of_game, *resources::controller, "choose");
const config* action = get_replay_source().get_next_action(); const config* action = get_replay_source().get_next_action();
if (!action || !*(action = &action->child("choose"))) { if (!action || !*(action = &action->child("choose"))) {
replay::throw_error("choice expected but none found\n"); replay::throw_error("choice expected but none found\n");
@ -3234,7 +3234,7 @@ WML_HANDLER_FUNCTION(message, event_info, cfg)
} }
if(has_text_input) { if(has_text_input) {
do_replay_handle(*resources::screen, *resources::game_map, *resources::units, *resources::teams, do_replay_handle(*resources::screen, *resources::game_map, *resources::units, *resources::teams,
side, *resources::tod_manager, *resources::state_of_game, *resources::controller, "input"); side, *resources::state_of_game, *resources::controller, "input");
const config* action = get_replay_source().get_next_action(); const config* action = get_replay_source().get_next_action();
if (!action || !*(action = &action->child("input"))) { if (!action || !*(action = &action->child("input"))) {
replay::throw_error("input expected but none found\n"); replay::throw_error("input expected but none found\n");

View File

@ -527,7 +527,7 @@ void playsingle_controller::play_turn(bool save)
LOG_NG << "doing replay " << player_number_ << "\n"; LOG_NG << "doing replay " << player_number_ << "\n";
try { try {
replaying_ = ::do_replay(*gui_, map_, units_, teams_, replaying_ = ::do_replay(*gui_, map_, units_, teams_,
player_number_, tod_manager_, gamestate_, *this); player_number_, gamestate_, *this);
} catch(replay::error&) { } catch(replay::error&) {
gui2::show_transient_message(gui_->video(),"",_("The file you have tried to load is corrupt")); gui2::show_transient_message(gui_->video(),"",_("The file you have tried to load is corrupt"));

View File

@ -126,7 +126,7 @@ turn_info::PROCESS_DATA_RESULT turn_info::process_network_data(const config& cfg
try{ try{
turn_end = do_replay(gui_, map_, units_, teams_, turn_end = do_replay(gui_, map_, units_, teams_,
team_num_, tod_manager_, state_of_game_, controller_, &replay_obj); team_num_, state_of_game_, controller_, &replay_obj);
} }
catch (replay::error& e){ catch (replay::error& e){
//notify remote hosts of out of sync error //notify remote hosts of out of sync error

View File

@ -738,7 +738,7 @@ static void check_checksums(game_display& disp,const unit_map& units,const confi
bool do_replay(game_display& disp, const gamemap& map, bool do_replay(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>& teams, int team_num, unit_map& units, std::vector<team>& teams, int team_num,
const tod_manager& tod_mng, game_state& state_of_game, play_controller& controller, replay* obj) game_state& state_of_game, play_controller& controller, replay* obj)
{ {
log_scope("do replay"); log_scope("do replay");
@ -753,13 +753,13 @@ bool do_replay(game_display& disp, const gamemap& map,
const rand_rng::set_random_generator generator_setter(&get_replay_source()); const rand_rng::set_random_generator generator_setter(&get_replay_source());
update_locker lock_update(disp.video(),get_replay_source().is_skipping()); update_locker lock_update(disp.video(),get_replay_source().is_skipping());
return do_replay_handle(disp, map, units, teams, team_num, tod_mng, state_of_game, controller, return do_replay_handle(disp, map, units, teams, team_num, state_of_game
std::string("")); , controller, std::string(""));
} }
bool do_replay_handle(game_display& disp, const gamemap& map, bool do_replay_handle(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>& teams, int team_num, unit_map& units, std::vector<team>& teams, int team_num,
const tod_manager& tod_mng, game_state& state_of_game, play_controller& controller, game_state& state_of_game, play_controller& controller,
const std::string& do_untill) const std::string& do_untill)
{ {
//a list of units that have promoted from the last attack //a list of units that have promoted from the last attack

View File

@ -156,11 +156,11 @@ extern replay recorder;
//returns true if it got to the end of the turn without data running out //returns true if it got to the end of the turn without data running out
bool do_replay(game_display& disp, const gamemap& map, bool do_replay(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>& teams, int team_num, unit_map& units, std::vector<team>& teams, int team_num,
const tod_manager& tod_mng, game_state& state_of_game, play_controller& controller, replay* obj=NULL); game_state& state_of_game, play_controller& controller, replay* obj=NULL);
bool do_replay_handle(game_display& disp, const gamemap& map, bool do_replay_handle(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>& teams, int team_num, unit_map& units, std::vector<team>& teams, int team_num,
const tod_manager& tod_mng, game_state& state_of_game, play_controller& controller, game_state& state_of_game, play_controller& controller,
const std::string& do_untill); const std::string& do_untill);
//an object which can be made to undo a recorded move //an object which can be made to undo a recorded move

View File

@ -335,7 +335,7 @@ void replay_controller::play_side(const unsigned int /*team_index*/, bool){
DBG_REPLAY << "doing replay " << player_number_ << "\n"; DBG_REPLAY << "doing replay " << player_number_ << "\n";
try { try {
::do_replay(*gui_, map_, units_, teams_, ::do_replay(*gui_, map_, units_, teams_,
player_number_, tod_manager_, gamestate_, *this); player_number_, gamestate_, *this);
} catch(replay::error&) { } catch(replay::error&) {
if(!continue_replay()) { if(!continue_replay()) {
throw; throw;