From b37c9439e3ece8aa552cdeea133d5f0243517d91 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 3 Sep 2020 11:06:04 +0800 Subject: [PATCH] support new trim/trimleft/trimright --- inc/hgl/type/BaseString.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/hgl/type/BaseString.h b/inc/hgl/type/BaseString.h index ed38984..7887954 100644 --- a/inc/hgl/type/BaseString.h +++ b/inc/hgl/type/BaseString.h @@ -857,7 +857,7 @@ namespace hgl protected: - typedef T *(*ConvFunc)(const T *,int &); + typedef const T *(*ConvFunc)(const T *,int &); bool StrConv(ConvFunc conv) { @@ -866,11 +866,11 @@ namespace hgl int new_len=data->GetLength(); - T *new_str=conv(data->c_str(),new_len); + const T *new_str=conv(data->c_str(),new_len); if(new_len>0) { - SetString(SelfClass::newOf(new_str,new_len)); + SetString(new_str,new_len); return(true); } else