Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/config/SettingsConfigFile.cc

    r10624 r11071  
    5757    SetConsoleCommand(__CC_getConfig_name,       &SettingsConfigFile::getConfig).argumentCompleter(0, autocompletion::settingssections()).argumentCompleter(1, autocompletion::settingsentries());
    5858
    59     SettingsConfigFile* SettingsConfigFile::singletonPtr_s = 0;
     59    SettingsConfigFile* SettingsConfigFile::singletonPtr_s = nullptr;
    6060
    6161    /**
     
    7777    SettingsConfigFile::~SettingsConfigFile()
    7878    {
    79         ModifyConsoleCommand(__CC_load_name).setObject(0);
    80         ModifyConsoleCommand(__CC_setFilename_name).setObject(0);
    81         ModifyConsoleCommand(__CC_config_name).setObject(0);
    82         ModifyConsoleCommand(__CC_tconfig_name).setObject(0);
    83         ModifyConsoleCommand(__CC_getConfig_name).setObject(0);
     79        ModifyConsoleCommand(__CC_load_name).setObject(nullptr);
     80        ModifyConsoleCommand(__CC_setFilename_name).setObject(nullptr);
     81        ModifyConsoleCommand(__CC_config_name).setObject(nullptr);
     82        ModifyConsoleCommand(__CC_tconfig_name).setObject(nullptr);
     83        ModifyConsoleCommand(__CC_getConfig_name).setObject(nullptr);
    8484    }
    8585
     
    106106    void SettingsConfigFile::addConfigValueContainer(ConfigValueContainer* container)
    107107    {
    108         if (container == NULL)
     108        if (container == nullptr)
    109109            return;
    110110        std::pair<std::string, ConfigValueContainer*> second(getLowercase(container->getName()), container);
     
    118118    void SettingsConfigFile::removeConfigValueContainer(ConfigValueContainer* container)
    119119    {
    120         if (container == NULL)
     120        if (container == nullptr)
    121121            return;
    122122        const std::string& sectionLC = getLowercase(container->getSectionName());
     
    142142        // todo: can this be done more efficiently? looks like some identifiers will be updated multiple times.
    143143
    144         for (ContainerMap::const_iterator it = this->containers_.begin(); it != this->containers_.end(); ++it)
    145         {
    146             it->second.second->update();
    147             it->second.second->getIdentifier()->updateConfigValues();
     144        for (const auto& mapEntry : this->containers_)
     145        {
     146            mapEntry.second.second->update();
     147            mapEntry.second.second->getIdentifier()->updateConfigValues();
    148148        }
    149149    }
     
    269269            {
    270270                std::string value;
    271                 it->second.second->getValue<std::string, void>(&value, NULL);
     271                it->second.second->getValue<std::string, void>(&value, nullptr);
    272272                return value;
    273273            }
Note: See TracChangeset for help on using the changeset viewer.