* Get the rating of a town for the #_current_company. * @param t Town to get the rating from. * @return Rating of the current company in the given town. */
| 4020 | * @return Rating of the current company in the given town. |
| 4021 | */ |
| 4022 | static int GetRating(const Town *t) |
| 4023 | { |
| 4024 | if (_town_rating_test) { |
| 4025 | auto it = _town_test_ratings.find(t); |
| 4026 | if (it != _town_test_ratings.end()) { |
| 4027 | return it->second; |
| 4028 | } |
| 4029 | } |
| 4030 | return t->ratings[_current_company]; |
| 4031 | } |
| 4032 | |
| 4033 | /** |
| 4034 | * Changes town rating of the current company |
no test coverage detected