Пример #1
0
bool BannerSet::HasBannerForFeature(FeatureType const & ft) const
{
  bool result = false;
  ft.ForEachType([this, &result](uint32_t type)
  {
    if (!result && HasBannerForType(type))
      result = true;
  });
  return result;
}
Пример #2
0
    void operator()(FeatureType & f, uint32_t)
    {
        ++m_totalCount;
        string s1, s2;
        f.GetPreferredNames(s1, s2);
        if (!s1.empty())
            ++m_namesCount;

        m_currFeatureTypes.clear();
        f.ForEachType([this](uint32_t type)
        {
            m_currFeatureTypes.push_back(type);
        });
        CHECK(!m_currFeatureTypes.empty(), ("Feature without any type???"));

        auto found = m_stats.insert(make_pair(m_currFeatureTypes, 1));
        if (!found.second)
            found.first->second++;
    }