removed repeated hgl_zero
This commit is contained in:
@@ -401,6 +401,15 @@ namespace hgl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定类型数据清0
|
||||||
|
*/
|
||||||
|
template<typename T>
|
||||||
|
inline void hgl_zero(T &data)
|
||||||
|
{
|
||||||
|
memset(&data,0,sizeof(T));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指定类型数据块清0
|
* 指定类型数据块清0
|
||||||
*/
|
*/
|
||||||
@@ -466,24 +475,6 @@ namespace hgl
|
|||||||
return memcmp(a,b,count*sizeof(T));
|
return memcmp(a,b,count*sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 指定类型数据清0
|
|
||||||
*/
|
|
||||||
template<typename T>
|
|
||||||
inline void hgl_zero(T &data)
|
|
||||||
{
|
|
||||||
memset(&data,0,sizeof(T));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指定类型数据清0
|
|
||||||
*/
|
|
||||||
template<typename T>
|
|
||||||
inline void hgl_zero(T *data,const uint count)
|
|
||||||
{
|
|
||||||
memset(data,0,sizeof(T)*count);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline T *array_alloc(const uint count)
|
inline T *array_alloc(const uint count)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user