diff --git a/inc/hgl/TypeFunc.h b/inc/hgl/TypeFunc.h index d4e0ba6..fc3c56f 100644 --- a/inc/hgl/TypeFunc.h +++ b/inc/hgl/TypeFunc.h @@ -401,6 +401,15 @@ namespace hgl } } + /** + * 指定类型数据清0 + */ + template + inline void hgl_zero(T &data) + { + memset(&data,0,sizeof(T)); + } + /** * 指定类型数据块清0 */ @@ -466,24 +475,6 @@ namespace hgl return memcmp(a,b,count*sizeof(T)); } - /** - * 指定类型数据清0 - */ - template - inline void hgl_zero(T &data) - { - memset(&data,0,sizeof(T)); - } - - /** - * 指定类型数据清0 - */ - template - inline void hgl_zero(T *data,const uint count) - { - memset(data,0,sizeof(T)*count); - } - template inline T *array_alloc(const uint count) {