From 88277a6026acf8f2d500d17565d2b93b48493a42 Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Sat, 25 Jun 2022 21:40:39 +0800 Subject: [PATCH] added a newly hgl_set function. --- inc/hgl/TypeFunc.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/inc/hgl/TypeFunc.h b/inc/hgl/TypeFunc.h index ddc6ec9..6a87afa 100644 --- a/inc/hgl/TypeFunc.h +++ b/inc/hgl/TypeFunc.h @@ -375,6 +375,8 @@ namespace hgl template inline void hgl_set(T *data,const T value,const size_t count) { + if(!data||count<=0)return; + for(size_t i=0;i + inline void hgl_set(T *data,const T *src,const size_t count) + { + if(!data||!src||count<=0)return; + + for(size_t i=0;i