updated macro of ENUM CLASS RANGE CHECK

This commit is contained in:
2023-01-31 16:26:21 +08:00
parent 1cfb3d7c3a
commit 8cfb16529c

View File

@@ -151,7 +151,7 @@ namespace hgl
inline Hash *CreateHash(HASH ha) inline Hash *CreateHash(HASH ha)
{ {
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(ha) RANGE_CHECK_RETURN_NULLPTR(ha)
using CreateHashFunc=Hash *(*)(); using CreateHashFunc=Hash *(*)();
@@ -204,7 +204,7 @@ namespace hgl
*/ */
inline bool CountHash(const void *data,int size,HASH ha,void *hash_code) inline bool CountHash(const void *data,int size,HASH ha,void *hash_code)
{ {
ENUM_CLASS_RANGE_ERROR_RETURN_FALSE(ha) RANGE_CHECK_RETURN_FALSE(ha)
if(!data||size<=0||!hash_code)return(false); if(!data||size<=0||!hash_code)return(false);
using CountHashFunc=bool (*)(const void *,int size,void *); using CountHashFunc=bool (*)(const void *,int size,void *);
@@ -271,7 +271,7 @@ namespace hgl
*/ */
inline bool CountHash(const void *data,int size,HASH ha,UTF8String &hash_str,bool litter=true) inline bool CountHash(const void *data,int size,HASH ha,UTF8String &hash_str,bool litter=true)
{ {
ENUM_CLASS_RANGE_ERROR_RETURN_FALSE(ha) RANGE_CHECK_RETURN_FALSE(ha)
if(!data||size<=0)return(false); if(!data||size<=0)return(false);
using CountHashFunc=bool (*)(const void *,int size,UTF8String &,bool); using CountHashFunc=bool (*)(const void *,int size,UTF8String &,bool);