- Timestamp:
- Jun 9, 2009, 1:31:32 PM (15 years ago)
- Location:
- code/branches/netp4/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp4/src/core/ConfigFileManager.cc
r2896 r3123 40 40 namespace orxonox 41 41 { 42 const int CONFIG_FILE_MAX_LINELENGHT = 1024;43 42 const char* const DEFAULT_CONFIG_FILE = "default.ini"; 44 43 … … 244 243 if (file.is_open()) 245 244 { 246 247 char linearray[CONFIG_FILE_MAX_LINELENGHT];248 249 245 ConfigFileSection* newsection = 0; 250 246 251 247 while (file.good() && !file.eof()) 252 248 { 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); 256 251 257 252 std::string temp = getStripped(line); -
code/branches/netp4/src/core/ConsoleCommandCompilation.cc
r1747 r3123 68 68 69 69 // Iterate through the file and put the lines into the CommandExecutor 70 char line[1024];71 70 while (file.good() && !file.eof()) 72 71 { 73 file.getline(line, 1024); 72 std::string line; 73 std::getline(file, line); 74 74 CommandExecutor::execute(line); 75 75 } … … 139 139 140 140 std::string output = ""; 141 char line[1024];142 141 while (file.good() && !file.eof()) 143 142 { 144 file.getline(line, 1024); 143 std::string line; 144 std::getline(file, line); 145 145 output += line; 146 146 output += "\n"; -
code/branches/netp4/src/core/Language.cc
r2759 r3123 224 224 } 225 225 226 char line[1024];227 228 226 // Iterate through the file and create the LanguageEntries 229 227 while (file.good() && !file.eof()) 230 228 { 231 file.getline(line, 1024);232 std:: string lineString = std::string(line);229 std::string lineString; 230 std::getline(file, lineString); 233 231 234 232 // Check if the line is empty … … 272 270 } 273 271 274 char line[1024];275 276 272 // Iterate through the file and create the LanguageEntries 277 273 while (file.good() && !file.eof()) 278 274 { 279 file.getline(line, 1024);280 std:: string lineString = std::string(line);275 std::string lineString; 276 std::getline(file, lineString); 281 277 282 278 // Check if the line is empty -
code/branches/netp4/src/core/LuaBind.cc
r3068 r3123 97 97 } 98 98 99 char line[1024*32];100 99 std::string levelString = ""; 101 100 102 101 while (file.good() && !file.eof()) 103 102 { 104 file.getline(line, 1024*32); 103 std::string line; 104 std::getline(file, line); 105 105 levelString += line; 106 106 levelString += "\n"; -
code/branches/netp4/src/util/OutputBuffer.cc
r2710 r3123 36 36 namespace orxonox 37 37 { 38 const int OUTPUTBUFFER_MAX_LINE_LENGTH = 16384; //! The maximal number of lines that can be stored within the OutputBuffer.39 40 38 /** 41 39 @brief Adds a new listener to the list. … … 105 103 bool OutputBuffer::getLine(std::string* output) 106 104 { 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); 111 106 112 107 bool eof = this->stream_.eof();
Note: See TracChangeset
for help on using the changeset viewer.