Skip to content

Commit 065f261

Browse files
author
schutzekatze
committed
Extra 0 division checks
1 parent ec6d371 commit 065f261

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

RResolver/RAlgorithmsShort.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ resolveRepeats()
741741
<< percentOrZero(pathsUnknown, pathsTotal) << "%)\n";
742742
for (size_t i = 0; i < unknownReasons; i++) {
743743
if (i > 0) { std::cerr << ", "; }
744-
std::cerr << unknownReasonLabels[i] << ": " << double(unknownReasonCounts[i]) / pathsUnknown * 100.0 << "%";
744+
std::cerr << unknownReasonLabels[i] << ": " << percentOrZero(unknownReasonCounts[i], pathsUnknown) << "%";
745745
}
746746
std::cerr << "\n";
747747
std::cerr << "Supported paths ~= " << pathsSupported << "/" << pathsKnown << " ("
@@ -770,7 +770,7 @@ resolveRepeats()
770770
<< percentOrZero(pathsUnknown, pathsTotal) << "%)\n";
771771
for (size_t i = 0; i < unknownReasons; i++) {
772772
if (i > 0) { std::cerr << ", "; }
773-
std::cerr << unknownReasonLabels[i] << ": " << double(unknownReasonCounts[i]) / pathsUnknown * 100.0 << "%";
773+
std::cerr << unknownReasonLabels[i] << ": " << percentOrZero(unknownReasonCounts[i], pathsUnknown) << "%";
774774
}
775775
std::cerr << "\n" << std::defaultfloat << std::flush;
776776
}

0 commit comments

Comments
 (0)