fix for zero rating

This commit is contained in:
Arsentiy Milchakov 2018-08-29 11:18:34 +03:00 committed by Roman Kuznetsov
parent f0162b029e
commit f864d990e1

View file

@ -357,7 +357,7 @@ Impress GetImpress(float const rawRating)
CHECK_LESS_OR_EQUAL(rawRating, kTopRatingBound, ());
CHECK_GREATER_OR_EQUAL(rawRating, kIncorrectRating, ());
if (rawRating == kIncorrectRating)
if (rawRating <= 0.0f)
return Impress::None;
if (rawRating < 0.2f * kTopRatingBound)
return Impress::Horrible;
@ -376,7 +376,7 @@ std::string GetRatingFormatted(float const rawRating)
CHECK_LESS_OR_EQUAL(rawRating, kTopRatingBound, ());
CHECK_GREATER_OR_EQUAL(rawRating, kIncorrectRating, ());
if (rawRating == kIncorrectRating)
if (rawRating <= 0.0f)
return kEmptyRatingSymbol;
std::ostringstream oss;