Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3198 for code/trunk/src/core


Ignore:
Timestamp:
Jun 20, 2009, 4:27:38 PM (16 years ago)
Author:
scheusso
Message:

merged netp4 back to trunk

Location:
code/trunk/src/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/ConfigFileManager.cc

    r3196 r3198  
    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);
  • code/trunk/src/core/ConsoleCommandCompilation.cc

    r3196 r3198  
    7373
    7474        // Iterate through the file and put the lines into the CommandExecutor
    75         char line[1024];
    7675        while (file.good() && !file.eof())
    7776        {
    78             file.getline(line, 1024);
     77            std::string line;
     78            std::getline(file, line);
    7979            CommandExecutor::execute(line);
    8080        }
     
    144144
    145145        std::string output = "";
    146         char line[1024];
    147146        while (file.good() && !file.eof())
    148147        {
    149             file.getline(line, 1024);
     148            std::string line;
     149            std::getline(file, line);
    150150            output += line;
    151151            output += "\n";
  • code/trunk/src/core/Language.cc

    r3196 r3198  
    224224        }
    225225
    226         char line[1024];
    227 
    228226        // Iterate through the file and create the LanguageEntries
    229227        while (file.good() && !file.eof())
    230228        {
    231             file.getline(line, 1024);
    232             std::string lineString = std::string(line);
     229            std::string lineString;
     230            std::getline(file, lineString);
    233231
    234232            // Check if the line is empty
     
    272270        }
    273271
    274         char line[1024];
    275 
    276272        // Iterate through the file and create the LanguageEntries
    277273        while (file.good() && !file.eof())
    278274        {
    279             file.getline(line, 1024);
    280             std::string lineString = std::string(line);
     275            std::string lineString;
     276            std::getline(file, lineString);
    281277
    282278            // Check if the line is empty
  • code/trunk/src/core/LuaBind.cc

    r3196 r3198  
    9595    }
    9696
    97     char line[1024*32];
    9897    std::string levelString = "";
    9998
    10099    while (file.good() && !file.eof())
    101100    {
    102       file.getline(line, 1024*32);
     101      std::string line;
     102      std::getline(file, line);
    103103      levelString += line;
    104104      levelString += "\n";
Note: See TracChangeset for help on using the changeset viewer.