Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

return collections directly instead of begin and end iterators.
this also fixes an issue in MultiStateEngine where two for-loops used begin() instead of end() in the loop condition.

Location:
code/branches/cpp11_v3/src/libraries/core/config
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3/src/libraries/core/config/ConfigFile.cc

    r11054 r11070  
    238238            file << section->getFileEntry() << endl;
    239239
    240             for (std::list<ConfigFileEntry*>::const_iterator it_entries = section->getEntriesBegin(); it_entries != section->getEntriesEnd(); ++it_entries)
    241                 file << (*it_entries)->getFileEntry() << endl;
     240            for (ConfigFileEntry* entry : section->getEntries())
     241                file << entry->getFileEntry() << endl;
    242242
    243243            file << endl;
  • code/branches/cpp11_v3/src/libraries/core/config/ConfigFileSection.h

    r11068 r11070  
    161161            std::list<ConfigFileEntry*>& getEntries()
    162162                { return this->entries_; }
    163             /// Returns the begin-iterator of the list of entries in this section.
    164             std::list<ConfigFileEntry*>::const_iterator getEntriesBegin() const
    165                 { return this->entries_.begin(); }
    166             /// Returns the end-iterator of the list of entries in this section.
    167             std::list<ConfigFileEntry*>::const_iterator getEntriesEnd() const
    168                 { return this->entries_.end(); }
     163            const std::list<ConfigFileEntry*>& getEntries() const
     164                { return this->entries_; }
    169165
    170166            std::list<ConfigFileEntry*>::iterator getOrCreateEntryIterator(const std::string& name, const std::string& fallback, bool bString);
Note: See TracChangeset for help on using the changeset viewer.