示例#1
0
void CBinaryAddonCache::GetDisabledAddons(VECADDONS& addons, const TYPE& type)
{
  VECADDONS myAddons;
  GetInstalledAddons(myAddons, type);

  for (auto &addon : myAddons)
  {
    if (CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()))
      addons.emplace_back(std::move(addon));
  }
}
示例#2
0
void CBinaryAddonCache::GetAddons(VECADDONS& addons, const TYPE& type)
{
  VECADDONS myAddons;
  {
    CSingleLock lock(m_critSection);
    auto it = m_addons.find(type);
    if (it != m_addons.end())
      myAddons = it->second;
  }

  for (auto &addon : myAddons)
  {
    if (!CAddonMgr::GetInstance().IsAddonDisabled(addon->ID()))
      addons.emplace_back(std::move(addon));
  }
}