Strip trailing whitespace.
This commit is contained in:
parent
259177b73b
commit
f4b00d8b17
12 changed files with 20 additions and 20 deletions
|
@ -2410,7 +2410,7 @@ size_t move_unit(move_unit_spectator *move_spectator,
|
|||
// move the real unit
|
||||
units.move(ui->first, steps.back());
|
||||
unit::clear_status_caches();
|
||||
|
||||
|
||||
ui = units.find(steps.back());
|
||||
ui->second.set_movement(moves_left);
|
||||
ui->second.set_standing();
|
||||
|
|
|
@ -1174,7 +1174,7 @@ public:
|
|||
|
||||
virtual const std::vector<unit>& get_recall_list() const;
|
||||
|
||||
|
||||
|
||||
virtual stage_ptr get_recruitment(ai_context &context) const;
|
||||
|
||||
|
||||
|
|
|
@ -789,7 +789,7 @@ bool move_leader_to_goals_phase::execute()
|
|||
remove_goal(id_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return gamestate_changed;
|
||||
}
|
||||
|
||||
|
@ -2013,7 +2013,7 @@ double leader_control_phase::evaluate()
|
|||
|
||||
bool leader_control_phase::execute()
|
||||
{
|
||||
ERR_AI_TESTING_AI_DEFAULT << get_name() << ": execute - not yet implemented" << std::endl;
|
||||
ERR_AI_TESTING_AI_DEFAULT << get_name() << ": execute - not yet implemented" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -613,7 +613,7 @@ void game_display::draw_movement_info(const map_location& loc)
|
|||
// With 11 colors, the last one will be used only for def=100
|
||||
int val = (game_config::defense_color_scale.size()-1) * def/100;
|
||||
SDL_Color color = int_to_color(game_config::defense_color_scale[val]);
|
||||
// simple waypoint (no turn point) use smaller font
|
||||
// simple waypoint (no turn point) use smaller font
|
||||
int def_font = w->second.turns > 0 ? 18 : 16;
|
||||
draw_text_in_hex(loc, LAYER_MOVE_INFO, def_text.str(), def_font, color);
|
||||
|
||||
|
|
|
@ -643,10 +643,10 @@ WML_HANDLER_FUNCTION(teleport, event_info, cfg)
|
|||
resources::screen->invalidate(src_loc);
|
||||
resources::screen->invalidate(dst);
|
||||
}
|
||||
|
||||
|
||||
resources::units->move(src_loc, vacant_dst);
|
||||
unit::clear_status_caches();
|
||||
|
||||
|
||||
u = resources::units->find(vacant_dst);
|
||||
u->second.set_standing();
|
||||
|
||||
|
@ -655,7 +655,7 @@ WML_HANDLER_FUNCTION(teleport, event_info, cfg)
|
|||
}
|
||||
|
||||
resources::screen->invalidate_unit_after_move(src_loc, dst);
|
||||
|
||||
|
||||
resources::screen->draw();
|
||||
}
|
||||
|
||||
|
|
|
@ -1099,7 +1099,7 @@ private:
|
|||
} else {
|
||||
//redo a dismissal
|
||||
recorder.add_disband(action.affected_unit.id());
|
||||
std::vector<unit>::iterator unit_it = std::find_if(current_team.recall_list().begin(),
|
||||
std::vector<unit>::iterator unit_it = std::find_if(current_team.recall_list().begin(),
|
||||
current_team.recall_list().end(), boost::bind(&unit::matches_id, _1, action.affected_unit.id()));
|
||||
current_team.recall_list().erase(unit_it);
|
||||
}
|
||||
|
@ -1122,7 +1122,7 @@ private:
|
|||
current_team.spend_gold(game_config::recall_cost);
|
||||
|
||||
//remove the unit from the recall list
|
||||
std::vector<unit>::iterator unit_it = std::find_if(current_team.recall_list().begin(),
|
||||
std::vector<unit>::iterator unit_it = std::find_if(current_team.recall_list().begin(),
|
||||
current_team.recall_list().end(), boost::bind(&unit::matches_id, _1, action.affected_unit.id()));
|
||||
assert(unit_it != current_team.recall_list().end());
|
||||
current_team.recall_list().erase(unit_it);
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
unit_map::iterator selected_unit();
|
||||
|
||||
void add_waypoint(const map_location& loc);
|
||||
|
||||
|
||||
marked_route get_route(unit_map::const_iterator un, map_location go_to, team &team);
|
||||
protected:
|
||||
/**
|
||||
|
|
|
@ -327,7 +327,7 @@ LEVEL_RESULT playsingle_controller::play_scenario(
|
|||
// Log before prestart events: they do weird things.
|
||||
if (first_human_team_ != -1) { //sp logs
|
||||
log.start(gamestate_, teams_[first_human_team_],
|
||||
loading_game_ ? gamestate_.get_variable("turn_number") : "",
|
||||
loading_game_ ? gamestate_.get_variable("turn_number") : "",
|
||||
number_of_turns(), resources::game_map->write());
|
||||
} else { //ai vs. ai upload logs
|
||||
log.start(gamestate_, resources::game_map->write());
|
||||
|
|
|
@ -977,7 +977,7 @@ bool do_replay_handle(int side_num, const std::string &do_untill)
|
|||
const std::string& unit_id = child["value"];
|
||||
map_location loc(child, resources::state_of_game);
|
||||
|
||||
std::vector<unit>::iterator recall_unit = std::find_if(current_team.recall_list().begin(),
|
||||
std::vector<unit>::iterator recall_unit = std::find_if(current_team.recall_list().begin(),
|
||||
current_team.recall_list().end(), boost::bind(&unit::matches_id, _1, unit_id));
|
||||
|
||||
if (recall_unit != current_team.recall_list().end()) {
|
||||
|
@ -1000,7 +1000,7 @@ bool do_replay_handle(int side_num, const std::string &do_untill)
|
|||
}
|
||||
|
||||
const std::string& unit_id = child["value"];
|
||||
std::vector<unit>::iterator disband_unit = std::find_if(current_team.recall_list().begin(),
|
||||
std::vector<unit>::iterator disband_unit = std::find_if(current_team.recall_list().begin(),
|
||||
current_team.recall_list().end(), boost::bind(&unit::matches_id, _1, unit_id));
|
||||
|
||||
if(disband_unit != current_team.recall_list().end()) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
class config;
|
||||
|
||||
namespace savegame {
|
||||
|
||||
|
||||
class savegame_config
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -288,7 +288,7 @@ void upload_log::start(game_state &state, const team &team,
|
|||
(*game_)["campaign"] = state.classification().campaign_define;
|
||||
(*game_)["difficulty"] = state.classification().difficulty;
|
||||
(*game_)["scenario"] = state.classification().scenario;
|
||||
|
||||
|
||||
//replace newlines in map definition with semicolons so that braindead server-side wml parser doesn't get confused
|
||||
std::string encoded_map(map_data);
|
||||
for(size_t idx = 0; idx < encoded_map.length(); idx++) {
|
||||
|
@ -296,7 +296,7 @@ void upload_log::start(game_state &state, const team &team,
|
|||
encoded_map[idx] = ';';
|
||||
}
|
||||
(*game_)["map_data"] = encoded_map;
|
||||
|
||||
|
||||
if (!state.classification().version.empty())
|
||||
(*game_)["version"] = state.classification().version;
|
||||
if (!turn.empty())
|
||||
|
@ -320,7 +320,7 @@ void upload_log::start(game_state &state, const std::string map_data)
|
|||
(*game_)["campaign"] = state.classification().campaign_type;
|
||||
(*game_)["difficulty"] = state.classification().difficulty;
|
||||
(*game_)["scenario"] = state.classification().label;
|
||||
|
||||
|
||||
//replace newlines in map definition with semicolons so that braindead server-side wml parser doesn't get confused
|
||||
std::string encoded_map(map_data);
|
||||
for(size_t idx = 0; idx < encoded_map.length(); idx++) {
|
||||
|
@ -328,7 +328,7 @@ void upload_log::start(game_state &state, const std::string map_data)
|
|||
encoded_map[idx] = ';';
|
||||
}
|
||||
(*game_)["map_data"] = encoded_map;
|
||||
|
||||
|
||||
if (!state.classification().version.empty())
|
||||
(*game_)["version"] = state.classification().version;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
// User starts a game (may be new campaign or saved).
|
||||
void start(game_state &state, const team &team,
|
||||
const t_string &turn, int num_turns,
|
||||
const t_string &turn, int num_turns,
|
||||
const std::string map_data);
|
||||
void start(game_state &state, const std::string map_data);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue