forked from organicmaps/organicmaps
fix for zero rating
This commit is contained in:
parent
f0162b029e
commit
f864d990e1
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue