| 2256 | } |
| 2257 | |
| 2258 | CountryId const Storage::GetParentIdFor(CountryId const & countryId) const |
| 2259 | { |
| 2260 | CountryTree::NodesBufferT nodes; |
| 2261 | m_countries.Find(countryId, nodes); |
| 2262 | if (nodes.empty()) |
| 2263 | { |
| 2264 | LOG(LWARNING, ("CountryId =", countryId, "not found in m_countries.")); |
| 2265 | return string(); |
| 2266 | } |
| 2267 | |
| 2268 | if (nodes.size() > 1) |
| 2269 | { |
| 2270 | // Disputed territory. Has multiple parents. |
| 2271 | return string(); |
| 2272 | } |
| 2273 | |
| 2274 | return nodes[0]->Value().GetParent(); |
| 2275 | } |
| 2276 | |
| 2277 | CountryId const Storage::GetTopmostParentFor(CountryId const & countryId) const |
| 2278 | { |