kill some warnings
This commit is contained in:
parent
02bd2fa8c1
commit
3c3fe8eb87
2 changed files with 13 additions and 3 deletions
|
@ -116,12 +116,12 @@ battle_prediction_pane::battle_prediction_pane(display &disp,
|
|||
defender_label_width_ = font::line_width(defender_label_, font::SIZE_PLUS, TTF_STYLE_BOLD);
|
||||
|
||||
// Get the units strings.
|
||||
get_unit_strings(attacker_stats, attacker_, attacker_loc_, attacker_combatant.untouched,
|
||||
get_unit_strings(attacker_stats, attacker_, attacker_loc_, static_cast<float>(attacker_combatant.untouched),
|
||||
defender_, defender_loc_, defender_stats.weapon,
|
||||
attacker_left_strings_, attacker_right_strings_,
|
||||
attacker_left_strings_width_, attacker_right_strings_width_, attacker_strings_width_);
|
||||
|
||||
get_unit_strings(defender_stats, defender_, defender_loc_, defender_combatant.untouched,
|
||||
get_unit_strings(defender_stats, defender_, defender_loc_, static_cast<float>(defender_combatant.untouched),
|
||||
attacker_, attacker_loc_, attacker_stats.weapon,
|
||||
defender_left_strings_, defender_right_strings_,
|
||||
defender_left_strings_width_, defender_right_strings_width_, defender_strings_width_);
|
||||
|
@ -523,7 +523,7 @@ void battle_prediction_pane::get_hp_distrib_surface(const std::vector<std::pair<
|
|||
SDL_FillRect(surf, &bar_rect_4, blend_rgb(surf, row_color.r, row_color.g, row_color.b, 0));
|
||||
|
||||
// Draw probability percentage, aligned right.
|
||||
format_prob(str_buf, prob);
|
||||
format_prob(str_buf, static_cast<float>(prob));
|
||||
int prob_width = font::line_width(str_buf, fs);
|
||||
font::draw_text_line(surf, clip_rect, fs, font::NORMAL_COLOUR, str_buf,
|
||||
width - prob_width - 4, 2 + (fs + 2) * i, 0, TTF_STYLE_NORMAL);
|
||||
|
|
|
@ -528,6 +528,12 @@ bool unit_movement_type::is_flying() const
|
|||
return utils::string_bool(flies);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
//silence "elements of array will be default initialized" warnings
|
||||
#pragma warning(disable:4351)
|
||||
#endif
|
||||
|
||||
unit_type::unit_type() :
|
||||
cfg_(),
|
||||
id_(),
|
||||
|
@ -568,6 +574,10 @@ unit_type::unit_type() :
|
|||
gender_types_[1] = NULL;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
unit_type::unit_type(const unit_type& o) :
|
||||
cfg_(o.cfg_),
|
||||
id_(o.id_),
|
||||
|
|
Loading…
Add table
Reference in a new issue