Give up on Coverity for this
Coverity wants a cast to double. Add it and it wants a cast to long long. Add THAT and Coverity and GCC both complain. I suppose there might be a way to rewrite things to make everyone happy. But it's easier to tell Coverity it's a false positive and force the issue closed.
This commit is contained in:
parent
23b98e2827
commit
e0366b1352
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>(static_cast<long long>(((expected * 20) + shift) / (2 * shift))) * 0.1
|
||||
<< (((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>(static_cast<long long>(((turn_expected * 20) + shift) / (2 * shift))) * 0.1
|
||||
<< (((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