This commit is contained in:
hyzboy 2025-05-09 01:09:41 +08:00
commit 511dd86c56
2 changed files with 4 additions and 2 deletions

View File

@ -77,4 +77,6 @@ namespace hgl
name=nullptr; \
} \
}
#define SAFE_CLEAR_STD_MAP(name) {for(auto &it:name)delete it.second;}
}//namespace hgl

View File

@ -400,7 +400,7 @@ namespace hgl
if(need_length>malloc_length)
{
malloc_length=power_to_2(need_length);
malloc_length=power_to_2(need_length+1);
T *new_str=new T[malloc_length];