ENH: fix div by 0

This commit is contained in:
Bill Hoffman 2007-07-20 13:03:14 -04:00
parent a6c86cbd04
commit 2fb1c43a11

View File

@ -1549,7 +1549,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
<< "\t<PercentCoverage>";
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
covSumFile.precision(2);
covSumFile << (percent_coverage/number_files)<< "</PercentCoverage>\n"
covSumFile << SAFEDIV(percent_coverage,number_files)<< "</PercentCoverage>\n"
<< "\t<EndDateTime>" << end_time << "</EndDateTime>\n";
covSumFile << "<ElapsedMinutes>" <<
static_cast<int>((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0