forked from github/server
coverity scan CID 22585, 22586: result is not floating point
This commit is contained in:
parent
70d4a6af03
commit
65429a12c3
1 changed files with 2 additions and 2 deletions
|
@ -505,7 +505,7 @@ static double study_speedup(unit * u, skill_t s, study_rule_t rule)
|
||||||
skill *sv = u->skills + i;
|
skill *sv = u->skills + i;
|
||||||
if (sv->id == s){
|
if (sv->id == s){
|
||||||
learnweeks = sv->level * (sv->level + 1) / 2.0;
|
learnweeks = sv->level * (sv->level + 1) / 2.0;
|
||||||
if (learnweeks < turn / 3) {
|
if (learnweeks < turn / 3.0) {
|
||||||
return 2.0;
|
return 2.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,7 @@ static double study_speedup(unit * u, skill_t s, study_rule_t rule)
|
||||||
skill *sv = u->skills + i;
|
skill *sv = u->skills + i;
|
||||||
learnweeks += (sv->level * (sv->level + 1) / 2.0);
|
learnweeks += (sv->level * (sv->level + 1) / 2.0);
|
||||||
}
|
}
|
||||||
if (learnweeks < turn / 2) {
|
if (learnweeks < turn / 2.0) {
|
||||||
return 2.0;
|
return 2.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue