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/util/OutputBuffer.cc

    r2710 r3123  
    3636namespace orxonox
    3737{
    38     const int OUTPUTBUFFER_MAX_LINE_LENGTH = 16384; //! The maximal number of lines that can be stored within the OutputBuffer.
    39 
    4038    /**
    4139        @brief Adds a new listener to the list.
     
    105103    bool OutputBuffer::getLine(std::string* output)
    106104    {
    107         char line[OUTPUTBUFFER_MAX_LINE_LENGTH];
    108 
    109         this->stream_.getline(line, OUTPUTBUFFER_MAX_LINE_LENGTH);
    110         (*output) = std::string(line);
     105        std::getline(this->stream_, *output);
    111106
    112107        bool eof = this->stream_.eof();
Note: See TracChangeset for help on using the changeset viewer.