Skip to content

Commit

Permalink
Merge pull request CxxTest#111 from yazug/value_traits_warning_hunting
Browse files Browse the repository at this point in the history
Warning hunting cleanup in ValueTraits.cpp

Thanks! This is good for merging straight.
  • Loading branch information
atomgalaxy authored Oct 22, 2017
2 parents b61a14e + 0579be6 commit 48bf84d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cxxtest/ValueTraits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void ValueTraits<const double>::hugeNumber(double t)
s = copyString(s, ".");
s = doubleToString(t, s, 1, DIGITS_ON_RIGHT);
s = copyString(s, "E");
s = numberToString(requiredDigitsOnLeft(t) - 1, s);
numberToString(requiredDigitsOnLeft(t) - 1, s);
}

void ValueTraits<const double>::normalNumber(double t)
Expand All @@ -171,17 +171,17 @@ void ValueTraits<const double>::nonFiniteNumber(double t)
char *s = _asString;
if (t != t)
{
s = copyString(s, "nan");
copyString(s, "nan");
}
//else if ( t == 1.0/0.0 )
else if (t >= HUGE_VAL)
{
s = copyString(s, "-inf");
copyString(s, "-inf");
}
else if (t <= -HUGE_VAL)
{
//else if ( t == -1.0/0.0 )
s = copyString(s, "inf");
copyString(s, "inf");
}
}

Expand Down

0 comments on commit 48bf84d

Please sign in to comment.