#4026 Contour Maps: Set +infinity (invalid) as max value if no valid max value was found

This commit is contained in:
Gaute Lindkvist
2019-02-04 08:16:57 +01:00
parent 9b90799e4c
commit 653b0eb856

View File

@@ -45,8 +45,6 @@
#include <algorithm> #include <algorithm>
#include <omp.h> #include <omp.h>
#include <QDebug>
namespace caf namespace caf
{ {
template<> template<>
@@ -521,6 +519,10 @@ double RimContourMapProjection::calculateValueInMapCell(uint i, uint j, const st
maxValue = std::max(maxValue, cellValue); maxValue = std::max(maxValue, cellValue);
} }
} }
if (maxValue == -std::numeric_limits<double>::infinity())
{
maxValue = std::numeric_limits<double>::infinity();
}
return maxValue; return maxValue;
} }
case RESULTS_MIN_VALUE: case RESULTS_MIN_VALUE: