Changeset 3198 for code/trunk/src/core
- Timestamp:
- Jun 20, 2009, 4:27:38 PM (16 years ago)
- Location:
- code/trunk/src/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/ConfigFileManager.cc
r3196 r3198 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/trunk/src/core/ConsoleCommandCompilation.cc
r3196 r3198 73 73 74 74 // Iterate through the file and put the lines into the CommandExecutor 75 char line[1024];76 75 while (file.good() && !file.eof()) 77 76 { 78 file.getline(line, 1024); 77 std::string line; 78 std::getline(file, line); 79 79 CommandExecutor::execute(line); 80 80 } … … 144 144 145 145 std::string output = ""; 146 char line[1024];147 146 while (file.good() && !file.eof()) 148 147 { 149 file.getline(line, 1024); 148 std::string line; 149 std::getline(file, line); 150 150 output += line; 151 151 output += "\n"; -
code/trunk/src/core/Language.cc
r3196 r3198 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/trunk/src/core/LuaBind.cc
r3196 r3198 95 95 } 96 96 97 char line[1024*32];98 97 std::string levelString = ""; 99 98 100 99 while (file.good() && !file.eof()) 101 100 { 102 file.getline(line, 1024*32); 101 std::string line; 102 std::getline(file, line); 103 103 levelString += line; 104 104 levelString += "\n";
Note: See TracChangeset
for help on using the changeset viewer.