fix some compiler warnings
This commit is contained in:
parent
935b45be31
commit
59bc686d88
3 changed files with 6 additions and 6 deletions
|
@ -65,7 +65,7 @@ candidate_action_with_filters::candidate_action_with_filters(
|
|||
const config & filter_params = cfg.child("filter");
|
||||
|
||||
if( filter_params ) {
|
||||
for(const config::attribute filter_param : filter_params.attribute_range())
|
||||
for(const config::attribute& filter_param : filter_params.attribute_range())
|
||||
{
|
||||
const_formula_ptr filter_formula(
|
||||
new formula(filter_param.second, function_table));
|
||||
|
|
|
@ -831,8 +831,8 @@ const frame_parameters unit_frame::merge_parameters(int current_time, const fram
|
|||
}
|
||||
|
||||
/** The engine provides a blend color for poisoned units */
|
||||
result.blend_ratio = current_val.blend_ratio?current_val.blend_ratio:animation_val.blend_ratio;
|
||||
if(primary && engine_val.blend_ratio) {
|
||||
result.blend_ratio = current_val.blend_ratio != 0 ? current_val.blend_ratio:animation_val.blend_ratio;
|
||||
if(primary && engine_val.blend_ratio != 0) {
|
||||
result.blend_ratio = std::min(result.blend_ratio + engine_val.blend_ratio, 1.0);
|
||||
}
|
||||
|
||||
|
@ -850,8 +850,8 @@ const frame_parameters unit_frame::merge_parameters(int current_time, const fram
|
|||
}
|
||||
|
||||
/** The engine provides a submerge for units in water */
|
||||
result.submerge = current_val.submerge ? current_val.submerge : animation_val.submerge;
|
||||
if(primary && engine_val.submerge && !result.submerge) {
|
||||
result.submerge = current_val.submerge != 0 ? current_val.submerge : animation_val.submerge;
|
||||
if(primary && engine_val.submerge != 0 && result.submerge == 0) {
|
||||
result.submerge = engine_val.submerge;
|
||||
}
|
||||
|
||||
|
|
|
@ -931,7 +931,7 @@ void unit::advance_to(const unit_type& u_type, bool use_traits)
|
|||
|
||||
// Reset the scalar values first
|
||||
trait_names_.clear();
|
||||
trait_descriptions_.clear(),
|
||||
trait_descriptions_.clear();
|
||||
is_fearless_ = false;
|
||||
is_healthy_ = false;
|
||||
image_mods_.clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue