delete "const" in TextInputStream

This commit is contained in:
hyzboy 2023-10-10 02:45:00 +08:00
parent 70b6567029
commit d5264e1da6
No known key found for this signature in database
GPG Key ID: 067EE4525D4FB6D3
2 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ namespace hgl
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 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)
{
@ -85,7 +85,7 @@ namespace hgl
private:
template<typename T> int Parse(const T *,ParseCallback<T> *);
template<typename T> int Parse(T *,ParseCallback<T> *);
int TextBlockParse(); ///<文本块解析

View File

@ -52,10 +52,10 @@ namespace hgl
template<> void TextInputStream::SetParseCallback(ParseCallback<u16char> *pc){callback_u16=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;
const T *end=(const T *)(buffer+cur_buf_size);
T *sp=(T *)p;
T *end=(T *)(buffer+cur_buf_size);
int line_count=0;