delete "const" in TextInputStream
This commit is contained in:
parent
70b6567029
commit
d5264e1da6
@ -26,7 +26,7 @@ namespace hgl
|
|||||||
|
|
||||||
virtual bool OnBOM(const ByteOrderMask &){return true;} ///<读取到BOM头的回调函数
|
virtual bool OnBOM(const ByteOrderMask &){return true;} ///<读取到BOM头的回调函数
|
||||||
|
|
||||||
virtual bool OnLine(const T *text,const int len){return true;}
|
virtual bool OnLine(T *text,const int len){return true;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取到一行文本的回调函数
|
* 读取到一行文本的回调函数
|
||||||
@ -34,7 +34,7 @@ namespace hgl
|
|||||||
* @param len 读取到的文本字长度
|
* @param len 读取到的文本字长度
|
||||||
* @param line_end 当前行是否结束
|
* @param line_end 当前行是否结束
|
||||||
*/
|
*/
|
||||||
virtual bool OnLine(const T *text,const int len,const bool line_end)
|
virtual bool OnLine(T *text,const int len,const bool line_end)
|
||||||
{
|
{
|
||||||
if(!line_end)
|
if(!line_end)
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ namespace hgl
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
template<typename T> int Parse(const T *,ParseCallback<T> *);
|
template<typename T> int Parse(T *,ParseCallback<T> *);
|
||||||
|
|
||||||
int TextBlockParse(); ///<文本块解析
|
int TextBlockParse(); ///<文本块解析
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ namespace hgl
|
|||||||
template<> void TextInputStream::SetParseCallback(ParseCallback<u16char> *pc){callback_u16=pc;}
|
template<> void TextInputStream::SetParseCallback(ParseCallback<u16char> *pc){callback_u16=pc;}
|
||||||
template<> void TextInputStream::SetParseCallback(ParseCallback<u32char> *pc){callback_u32=pc;}
|
template<> void TextInputStream::SetParseCallback(ParseCallback<u32char> *pc){callback_u32=pc;}
|
||||||
|
|
||||||
template<typename T> int TextInputStream::Parse(const T *p,ParseCallback<T> *pc)
|
template<typename T> int TextInputStream::Parse(T *p,ParseCallback<T> *pc)
|
||||||
{
|
{
|
||||||
const T *sp=(const T *)p;
|
T *sp=(T *)p;
|
||||||
const T *end=(const T *)(buffer+cur_buf_size);
|
T *end=(T *)(buffer+cur_buf_size);
|
||||||
|
|
||||||
int line_count=0;
|
int line_count=0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user