| 36 | } |
| 37 | |
| 38 | std::unique_ptr<FeatureType> MwmContext::GetFeature(uint32_t index, bool ignoreEditedStatus) const |
| 39 | { |
| 40 | if (ignoreEditedStatus) |
| 41 | { |
| 42 | auto ft = m_vector.GetByIndex(index); |
| 43 | CHECK(ft, ()); |
| 44 | ft->SetID(FeatureID(GetId(), index)); |
| 45 | return ft; |
| 46 | } |
| 47 | |
| 48 | std::unique_ptr<FeatureType> ft; |
| 49 | switch (GetEditedStatus(index)) |
| 50 | { |
| 51 | case FeatureStatus::Deleted: |
| 52 | case FeatureStatus::Obsolete: return ft; |
| 53 | case FeatureStatus::Modified: |
| 54 | case FeatureStatus::Created: |
| 55 | ft = m_editableSource.GetModifiedFeature(index); |
| 56 | CHECK(ft, ()); |
| 57 | return ft; |
| 58 | case FeatureStatus::Untouched: |
| 59 | auto ft = m_vector.GetByIndex(index); |
| 60 | CHECK(ft, ()); |
| 61 | ft->SetID(FeatureID(GetId(), index)); |
| 62 | return ft; |
| 63 | } |
| 64 | UNREACHABLE(); |
| 65 | } |
| 66 | |
| 67 | std::optional<uint32_t> MwmContext::GetStreet(uint32_t index) const |
| 68 | { |
no test coverage detected