diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-09-03 15:27:38 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-09-06 15:07:03 +0300 |
commit | a78bfca62641eb95e433aa1cc49c5bc77e4fc3dc (patch) | |
tree | 632ec20d75a7faee44fa52730bce6e823d816cd7 /ugc | |
parent | 2724cc7a2e57bca64705d83d92e95d382e9dc11a (diff) |
[ugc][core] Ugc without ratings is allowed, incorrect rating is changed to 0.0f
Diffstat (limited to 'ugc')
-rw-r--r-- | ugc/types.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ugc/types.hpp b/ugc/types.hpp index f1948d5d61..327b174280 100644 --- a/ugc/types.hpp +++ b/ugc/types.hpp @@ -337,7 +337,8 @@ struct UGC bool IsEmpty() const { - return !((!m_ratings.empty() || !m_reviews.empty()) && m_totalRating >= 0 && m_basedOn > 0); + return m_reviews.empty() && + (m_ratings.empty() || m_totalRating <= kInvalidRatingValue || m_basedOn == 0); } Ratings m_ratings; |