mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 05:53:25 -06:00
#6941 Use std::limits<double>::max() instead of HUGE_VAL for histogram data.
This commit is contained in:
parent
95f6626480
commit
7120b9ad7e
@ -18,18 +18,18 @@
|
||||
|
||||
#include "RimHistogramData.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimHistogramData::RimHistogramData()
|
||||
: min( HUGE_VAL )
|
||||
, max( HUGE_VAL )
|
||||
, p10( HUGE_VAL )
|
||||
, p90( HUGE_VAL )
|
||||
, mean( HUGE_VAL )
|
||||
, weightedMean( HUGE_VAL )
|
||||
: min( std::numeric_limits<double>::max() )
|
||||
, max( std::numeric_limits<double>::max() )
|
||||
, p10( std::numeric_limits<double>::max() )
|
||||
, p90( std::numeric_limits<double>::max() )
|
||||
, mean( std::numeric_limits<double>::max() )
|
||||
, weightedMean( std::numeric_limits<double>::max() )
|
||||
, sum( 0.0 )
|
||||
, histogram( nullptr )
|
||||
{
|
||||
@ -48,7 +48,7 @@ bool RimHistogramData::isMinMaxValid() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimHistogramData::isValid( double parameter ) const
|
||||
{
|
||||
return parameter != HUGE_VAL && parameter != -HUGE_VAL;
|
||||
return parameter != std::numeric_limits<double>::max() && parameter != -std::numeric_limits<double>::max();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user