diff --git a/generator/generator_tests/ugc_test.cpp b/generator/generator_tests/ugc_test.cpp index 759fdb42ca..a1826fb5a1 100644 --- a/generator/generator_tests/ugc_test.cpp +++ b/generator/generator_tests/ugc_test.cpp @@ -47,7 +47,7 @@ UNIT_TEST(UGC_TranslateRatingTest) bool rc = tr.TranslateUGC(id, ugc); TEST(rc, ("Can't translate rating for", id)); - TEST_EQUAL(ugc.m_rating.m_ratings.size(), 1, ()); - TEST_EQUAL(ugc.m_rating.m_ratings[0].m_key, "TranslationKey14", ()); - TEST_EQUAL(ugc.m_rating.m_ratings[0].m_value, 4.0, ()); + TEST_EQUAL(ugc.m_ratings.size(), 1, ()); + TEST_EQUAL(ugc.m_ratings[0].m_key, "TranslationKey14", ()); + TEST_EQUAL(ugc.m_ratings[0].m_value, 4.0, ()); } diff --git a/generator/ugc_translator.cpp b/generator/ugc_translator.cpp index b3becb7cdc..60c172521d 100644 --- a/generator/ugc_translator.cpp +++ b/generator/ugc_translator.cpp @@ -15,7 +15,7 @@ UGCTranslator::UGCTranslator(std::string const & path) bool UGCTranslator::TranslateUGC(osm::Id const & id, ugc::UGC & ugc) { - bool ratingsOk = TranslateRating(m_dbRatings, id, ugc.m_rating); + bool ratingsOk = TranslateRatings(m_dbRatings, id, ugc.m_ratings); bool reviewsOk = TranslateReview(m_dbReviews, id, ugc.m_reviews); return ratingsOk && reviewsOk; } @@ -32,7 +32,7 @@ void UGCTranslator::CreateReviews(std::string const & data) UNUSED_VALUE(rc); } -bool UGCTranslator::TranslateRating(UGCDB & db, osm::Id const id, ugc::Rating & rating) +bool UGCTranslator::TranslateRatings(UGCDB & db, osm::Id const id, ugc::Ratings & ratings) { std::vector blob; bool rc = db.Get(id, blob); @@ -54,7 +54,7 @@ bool UGCTranslator::TranslateRating(UGCDB & db, osm::Id const id, ugc::Rating & std::ostringstream translationKey; translationKey << "TranslationKey" << translationKeyId; - rating.m_ratings.emplace_back(translationKey.str(), static_cast(ratingValue)); + ratings.emplace_back(translationKey.str(), static_cast(ratingValue)); } return true; diff --git a/generator/ugc_translator.hpp b/generator/ugc_translator.hpp index 1499120319..bc22a44e19 100644 --- a/generator/ugc_translator.hpp +++ b/generator/ugc_translator.hpp @@ -19,7 +19,7 @@ public: void CreateReviews(std::string const & data); private: - bool TranslateRating(UGCDB & db, osm::Id const id, ugc::Rating & rating); + bool TranslateRatings(UGCDB & db, osm::Id const id, ugc::Ratings & ratings); bool TranslateReview(UGCDB & db, osm::Id const id, std::vector & review); // bool TranslateAttribute(UGCDB & db, osm::Id const id, ugc::Attribute & attribute);