Changeset 5948 in orxonox.OLD for trunk/src/lib/parser/ini_parser/ini_parser.cc
- Timestamp:
- Dec 7, 2005, 12:56:40 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/parser/ini_parser/ini_parser.cc
r5947 r5948 56 56 { 57 57 this->deleteSections(); 58 this->setFileName(NULL); 58 59 } 59 60 … … 74 75 // delete all strings of entries. 75 76 IniEntry entry = section.entries.front(); 76 delete []entry.name; 77 delete []entry.value; 77 delete[] entry.name; 78 delete[] entry.value; 79 delete[] entry.comment; 78 80 section.entries.pop_front(); 79 81 } 80 82 // delete all Sections 81 delete []section.name; 83 delete[] section.name; 84 delete[] section.comment; 82 85 this->sections.pop_front(); 83 86 } … … 94 97 void IniParser::setFileName(const char* fileName) 95 98 { 96 if (this->fileName) 97 delete []this->fileName; 99 if (this->fileName != NULL) 100 delete[] this->fileName; 101 if (this->comment != NULL) 102 delete[] this->comment; 103 this->comment = NULL; 104 98 105 if (fileName != NULL) 99 106 {
Note: See TracChangeset
for help on using the changeset viewer.