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/ConsoleCommandCompilation.cc

    r1747 r3123  
    6868
    6969        // Iterate through the file and put the lines into the CommandExecutor
    70         char line[1024];
    7170        while (file.good() && !file.eof())
    7271        {
    73             file.getline(line, 1024);
     72            std::string line;
     73            std::getline(file, line);
    7474            CommandExecutor::execute(line);
    7575        }
     
    139139
    140140        std::string output = "";
    141         char line[1024];
    142141        while (file.good() && !file.eof())
    143142        {
    144             file.getline(line, 1024);
     143            std::string line;
     144            std::getline(file, line);
    145145            output += line;
    146146            output += "\n";
Note: See TracChangeset for help on using the changeset viewer.