One more time Coverity
When you fix the complaint about implicitly converting a long long to a double you get a complaint about implicity discarding the remainder from an integer division. Mumble. Grumble. Glare at Coverity. Closes CID 1382228
This commit is contained in:
parent
df4e424db0
commit
631acb2bb8
1 changed files with 2 additions and 2 deletions
|
@ -145,7 +145,7 @@ void statistics_dialog::add_damage_row(
|
|||
|
||||
std::ostringstream str;
|
||||
str << damage << " / "
|
||||
<< static_cast<double>(((expected * 20) + shift) / (2 * shift)) * 0.1
|
||||
<< static_cast<double>(static_cast<long long>(((expected * 20) + shift) / (2 * shift))) * 0.1
|
||||
<< " " // TODO: should probably make this two columns
|
||||
<< ((dsa < 0) ^ (expected < 0) ? "" : "+")
|
||||
<< (expected == 0 ? 0 : 100 * dsa / expected) << '%';
|
||||
|
@ -157,7 +157,7 @@ void statistics_dialog::add_damage_row(
|
|||
|
||||
if(show_this_turn) {
|
||||
str << turn_damage << " / "
|
||||
<< static_cast<double>(((turn_expected * 20) + shift) / (2 * shift)) * 0.1
|
||||
<< static_cast<double>(static_cast<long long>(((turn_expected * 20) + shift) / (2 * shift))) * 0.1
|
||||
<< " " // TODO: should probably make this two columns
|
||||
<< ((dst < 0) ^ (turn_expected < 0) ? "" : "+")
|
||||
<< (turn_expected == 0 ? 0 : 100 * dst / turn_expected) << '%';
|
||||
|
|
Loading…
Add table
Reference in a new issue