fix String::SetInstance/StrcpyInstance functions

This commit is contained in:
2020-09-05 14:56:46 +08:00
parent 857b758312
commit a30567c431

View File

@@ -260,7 +260,7 @@ namespace hgl
* @param str 字符串内容在len<0的情况下需以0为结尾 * @param str 字符串内容在len<0的情况下需以0为结尾
* @param len 字符串长度 * @param len 字符串长度
*/ */
void SetInstance(const T *str,const uint len) void SetInstance(T *str,const uint len)
{ {
if(!str||!*str) if(!str||!*str)
{ {
@@ -277,7 +277,7 @@ namespace hgl
SetString(str,len); SetString(str,len);
} }
void StrcpyInstance(const T *str,int len=-1) void StrcpyInstance(T *str,int len=-1)
{ {
SetInstance(str,len); SetInstance(str,len);
} }