fixed a but that it never delete fis in ParseCSVFile

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2023-07-27 18:57:17 +08:00
parent 9c7aecfdb0
commit 4d62d19187

View File

@ -55,13 +55,10 @@ namespace hgl
template<typename T> inline bool ParseCSVFile(const OSString &filename,CSVParseCallback<T> *pcb)
{
io::FileInputStream *fis=new io::FileInputStream;
io::OpenFileInputStream fis(filename);
if(!fis->Open(filename))
{
delete fis;
if(!fis)
return false;
}
return ParseCSV<T>(fis,pcb);
}