Skip to content

Commit

Permalink
remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jun 1, 2014
1 parent 9687383 commit a08efab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/gamestatus.cpp
Expand Up @@ -79,7 +79,7 @@ class team_builder {
team_builder(const config& side_cfg,
const std::string &save_id, std::vector<team>& teams,
const config& level, gamemap& map, unit_map& units,
bool snapshot, const config &starting_pos)
const config &starting_pos)
: gold_info_ngold_(0)
, leader_configs_()
, level_(level)
Expand All @@ -89,7 +89,6 @@ class team_builder {
, seen_ids_()
, side_(0)
, side_cfg_(side_cfg)
, snapshot_(snapshot)
, starting_pos_(starting_pos)
, t_(NULL)
, teams_(teams)
Expand Down Expand Up @@ -145,7 +144,6 @@ class team_builder {
std::set<std::string> seen_ids_;
int side_;
const config &side_cfg_;
bool snapshot_;
const config &starting_pos_;
team *t_;
std::vector<team> &teams_;
Expand Down Expand Up @@ -493,9 +491,9 @@ void game_data::write_config(config_writer& out){
team_builder_ptr game_data::create_team_builder(const config& side_cfg,
std::string save_id, std::vector<team>& teams,
const config& level, gamemap& map, unit_map& units,
bool snapshot, const config& starting_pos)
const config& starting_pos)
{
return team_builder_ptr(new team_builder(side_cfg,save_id,teams,level,map,units,snapshot,starting_pos));
return team_builder_ptr(new team_builder(side_cfg, save_id, teams, level, map, units, starting_pos));
}

void game_data::build_team_stage_one(team_builder_ptr tb_ptr)
Expand Down
2 changes: 1 addition & 1 deletion src/gamestatus.hpp
Expand Up @@ -92,7 +92,7 @@ class game_data : public variable_set {
//create an object responsible for creating and populating a team from a config
team_builder_ptr create_team_builder(const config& side_cfg, std::string save_id
, std::vector<team>& teams, const config& level, gamemap& map
, unit_map& units, bool snapshot, const config& starting_pos);
, unit_map& units, const config& starting_pos);

//do first stage of team initialization (everything except unit placement)
void build_team_stage_one(team_builder_ptr tb_ptr);
Expand Down
4 changes: 1 addition & 3 deletions src/play_controller.cpp
Expand Up @@ -183,8 +183,6 @@ void play_controller::init(CVideo& video){
// If i am wrong, use random_new_deterministic
recorder.set_skip(false);

bool snapshot = level_["snapshot"].to_bool();

if (level_["modify_placing"].to_bool()) {
LOG_NG << "modifying placing..." << std::endl;
place_sides_in_preferred_locations();
Expand Down Expand Up @@ -223,7 +221,7 @@ void play_controller::init(CVideo& video){
}
}
team_builder_ptr tb_ptr = gamedata_.create_team_builder(side,
save_id, gameboard_.teams_, level_, gameboard_.map_, gameboard_.units_, snapshot, gamestate_.replay_start());
save_id, gameboard_.teams_, level_, gameboard_.map_, gameboard_.units_, gamestate_.replay_start());
++team_num;
gamedata_.build_team_stage_one(tb_ptr);
team_builders.push_back(tb_ptr);
Expand Down

0 comments on commit a08efab

Please sign in to comment.