| 430 | } |
| 431 | |
| 432 | bool SearchAPI::QueryMayBeSkipped(SearchParams const & prevParams, SearchParams const & currParams) const |
| 433 | { |
| 434 | auto const & prevViewport = prevParams.m_viewport; |
| 435 | auto const & currViewport = currParams.m_viewport; |
| 436 | |
| 437 | if (!prevParams.IsEqualCommon(currParams)) |
| 438 | return false; |
| 439 | |
| 440 | if (!prevViewport.IsValid() || !IsEqualMercator(prevViewport, currViewport, kDistEqualQueryMercator)) |
| 441 | return false; |
| 442 | |
| 443 | if (prevParams.m_position && currParams.m_position && |
| 444 | mercator::DistanceOnEarth(*prevParams.m_position, *currParams.m_position) > kDistEqualQueryMercator) |
| 445 | { |
| 446 | return false; |
| 447 | } |
| 448 | |
| 449 | if (static_cast<bool>(prevParams.m_position) != static_cast<bool>(currParams.m_position)) |
| 450 | return false; |
| 451 | |
| 452 | return true; |
| 453 | } |
nothing calls this directly
no test coverage detected