move file->close() into the if() clause. b=382508, r=luser

This commit is contained in:
dcamp%mozilla.com 2007-06-24 06:17:10 +00:00
Родитель 7f519814f1
Коммит 90dc1e6607
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -155,9 +155,9 @@ bool ReadStringsFromFile(const string& path,
bool success = false;
if (f->is_open()) {
success = ReadStrings(*f, strings, unescape);
f->close();
}
f->close();
delete f;
return success;
}
@ -192,9 +192,9 @@ bool WriteStringsToFile(const string& path,
bool success = false;
if (f->is_open()) {
success = WriteStrings(*f, header, strings, escape);
f->close();
}
f->close();
delete f;
return success;
}