upgraded CSVParse.h
This commit is contained in:
parent
4d62d19187
commit
cfb772cb55
@ -30,13 +30,11 @@ namespace hgl
|
|||||||
bool OnLine(const T *text,const int length) override
|
bool OnLine(const T *text,const int length) override
|
||||||
{
|
{
|
||||||
if(!text||!*text||length<=0)
|
if(!text||!*text||length<=0)
|
||||||
return(false);
|
return(true);
|
||||||
|
|
||||||
splite.Start(text,length);
|
splite.Start(text,length);
|
||||||
|
|
||||||
callback->OnLine(splite);
|
return callback->OnLine(splite);
|
||||||
|
|
||||||
return(true);
|
|
||||||
}
|
}
|
||||||
};//class CSVTextParse
|
};//class CSVTextParse
|
||||||
|
|
||||||
@ -48,9 +46,7 @@ namespace hgl
|
|||||||
|
|
||||||
tis.SetParseCallback<T>(&parse);
|
tis.SetParseCallback<T>(&parse);
|
||||||
|
|
||||||
tis.Run();
|
return tis.Run()>0;
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T> inline bool ParseCSVFile(const OSString &filename,CSVParseCallback<T> *pcb)
|
template<typename T> inline bool ParseCSVFile(const OSString &filename,CSVParseCallback<T> *pcb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user