| 1923 | } |
| 1924 | |
| 1925 | bool Geocoder::GetTypeInGeocoding(BaseContext const & ctx, uint32_t featureId, Model::Type & type) |
| 1926 | { |
| 1927 | if (ctx.m_streets.HasBit(featureId)) |
| 1928 | { |
| 1929 | type = Model::TYPE_STREET; |
| 1930 | return true; |
| 1931 | } |
| 1932 | if (ctx.m_suburbs.HasBit(featureId)) |
| 1933 | { |
| 1934 | type = Model::TYPE_SUBURB; |
| 1935 | return true; |
| 1936 | } |
| 1937 | if (ctx.m_villages.HasBit(featureId)) |
| 1938 | { |
| 1939 | type = Model::TYPE_VILLAGE; |
| 1940 | return true; |
| 1941 | } |
| 1942 | |
| 1943 | auto feature = m_context->GetFeature(featureId); |
| 1944 | if (!feature) |
| 1945 | return false; |
| 1946 | |
| 1947 | type = m_model.GetType(*feature); |
| 1948 | return true; |
| 1949 | } |
| 1950 | } // namespace search |
| 1951 | |
| 1952 | #undef TRACE |
nothing calls this directly
no test coverage detected