Exemple #1
0
void CSettings::AddProfile(const CProfile &profile)
{
    //data integrity check - covers off migration from old profiles.xml, incrementing of the m_nextIdProfile,and bad data coming in
    m_nextIdProfile = max(m_nextIdProfile, profile.getId() + 1);

    m_vecProfiles.push_back(profile);
}
void CProfilesManager::AddProfile(const CProfile &profile)
{
  CSingleLock lock(m_critical);
  // data integrity check - covers off migration from old profiles.xml,
  // incrementing of the m_nextIdProfile,and bad data coming in
  m_nextProfileId = max(m_nextProfileId, profile.getId() + 1);

  m_profiles.push_back(profile);
}