We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ee30255 + b4d1bd1 commit 511dd86Copy full SHA for 511dd86
inc/hgl/Macro.h
@@ -77,4 +77,6 @@ namespace hgl
77
name=nullptr; \
78
} \
79
}
80
-}//namespace hgl
+
81
+ #define SAFE_CLEAR_STD_MAP(name) {for(auto &it:name)delete it.second;}
82
+}//namespace hgl
inc/hgl/type/StringInstance.h
@@ -400,7 +400,7 @@ namespace hgl
400
401
if(need_length>malloc_length)
402
{
403
- malloc_length=power_to_2(need_length);
+ malloc_length=power_to_2(need_length+1);
404
405
T *new_str=new T[malloc_length];
406
0 commit comments