Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2009, 1:31:32 PM (15 years ago)
Author:
rgrieder
Message:

Replaced all the std::istream::getline(const char*) calls with std::getline(std::ostream, std::string).
This gets rid of these nasty MAX_BUFFER = 1024 (or however long you want to make it) limitations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp4/src/core/ConfigFileManager.cc

    r2896 r3123  
    4040namespace orxonox
    4141{
    42     const int CONFIG_FILE_MAX_LINELENGHT  = 1024;
    4342    const char* const DEFAULT_CONFIG_FILE = "default.ini";
    4443
     
    244243        if (file.is_open())
    245244        {
    246 
    247             char linearray[CONFIG_FILE_MAX_LINELENGHT];
    248 
    249245            ConfigFileSection* newsection = 0;
    250246
    251247            while (file.good() && !file.eof())
    252248            {
    253                 file.getline(linearray, CONFIG_FILE_MAX_LINELENGHT);
    254 
    255                 std::string line = std::string(linearray);
     249                std::string line;
     250                std::getline(file, line);
    256251
    257252                std::string temp = getStripped(line);
Note: See TracChangeset for help on using the changeset viewer.