renamed to SAFE_CLEAR_OBJECT_ARRAY_OBJECT from SAFE_CLEAR_OBJECT_ARRAY, added a newly SAFE_CLEAR_OBJECT_ARRAY
This commit is contained in:
parent
538d19781a
commit
913bcfcfb2
@ -26,7 +26,7 @@ namespace hgl
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SAFE_CLEAR_OBJECT_ARRAY(name,num) { \
|
#define SAFE_CLEAR_OBJECT_ARRAY_OBJECT(name,num) { \
|
||||||
if(name&&num>=0) \
|
if(name&&num>=0) \
|
||||||
{ \
|
{ \
|
||||||
int safe_clear_object_array_number=num; \
|
int safe_clear_object_array_number=num; \
|
||||||
@ -40,6 +40,13 @@ namespace hgl
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SAFE_CLEAR_OBJECT_ARRAY(name) { \
|
||||||
|
for(auto *obj:name)\
|
||||||
|
{ \
|
||||||
|
SAFE_CLEAR(obj); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
#define FREE_OBJECT_ARRAY(name,num) { \
|
#define FREE_OBJECT_ARRAY(name,num) { \
|
||||||
if(name&&num>=0) \
|
if(name&&num>=0) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -630,7 +630,7 @@ namespace hgl
|
|||||||
|
|
||||||
~AutoDeleteObjectArray()
|
~AutoDeleteObjectArray()
|
||||||
{
|
{
|
||||||
SAFE_CLEAR_OBJECT_ARRAY(items,count);
|
SAFE_CLEAR_OBJECT_ARRAY_OBJECT(items,count);
|
||||||
}
|
}
|
||||||
|
|
||||||
TP *operator -> (){return items;}
|
TP *operator -> (){return items;}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user