bool ResultMatches(DataSource const & dataSource, shared_ptr<MatchingRule> rule, search::Result const & result) { bool matches = false; dataSource.ReadFeature([&](FeatureType & ft) { matches = rule->Matches(ft); }, result.GetFeatureID()); return matches; }