Skip to content
Permalink
Browse files

Correct initialization of Max

FLT_MIN is the smallest positive float

(cherry-picked from 8a47b5c)
  • Loading branch information
gvellut authored and nyalldawson committed Mar 1, 2016
1 parent 1c4c92b commit 2b72350aa580a4beb3c8cf5cccedb479ac20a5fe
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/analysis/vector/qgszonalstatistics.h
@@ -67,7 +67,7 @@ class ANALYSIS_EXPORT QgsZonalStatistics
{
reset();
}
void reset() { sum = 0; count = 0; max = FLT_MIN; min = FLT_MAX; valueCount.clear(); values.clear(); }
void reset() { sum = 0; count = 0; max = -FLT_MAX; min = FLT_MAX; valueCount.clear(); values.clear(); }
void addValue( float value, double weight = 1.0 )
{
if ( weight < 1.0 )

0 comments on commit 2b72350

Please sign in to comment.
You can’t perform that action at this time.