Skip to content

Commit

Permalink
better range inits
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Metrot committed May 30, 2014
1 parent ed8d552 commit dc62b0d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Base/nuiRange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ nuiRange::nuiRange(double Value, double Min, double Max, double Increment, doubl
mPageIncrement = PageIncrement;

mValue = Value;
SetValue(Value);
if (isfinite(Value))
{
SetValue(Value);
}

if (std::isnan(Origin))
{
Expand Down Expand Up @@ -112,12 +115,7 @@ void nuiRange::SetUnitValue(double Value)

void nuiRange::SetValue(double Value)
{
#ifdef DEBUG
if (IsValid())
{
NGL_ASSERT(std::isfinite(Value));
}
#endif
NGL_ASSERT(std::isfinite(Value));

double OldValue = mValue;

Expand Down

0 comments on commit dc62b0d

Please sign in to comment.