From 7ba0796b05a8abbd7e6c4c8af675e09fb208c2b0 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 26 Jul 2024 03:13:23 +0800 Subject: [PATCH] Added SortedSets::Delete(const DataArray<> &) --- inc/hgl/type/SortedSets.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/hgl/type/SortedSets.h b/inc/hgl/type/SortedSets.h index ea2d68d..d9f089e 100644 --- a/inc/hgl/type/SortedSets.h +++ b/inc/hgl/type/SortedSets.h @@ -133,7 +133,7 @@ namespace hgl * @param count 数据个数 * @return 成功删除的数据个数 */ - int64 Delete(T *dp,const int64 count) + int64 Delete(const T *dp,const int64 count) { int64 total=0; int64 pos; @@ -153,6 +153,11 @@ namespace hgl return total; } + int64 Delete(const DataArray &da) + { + return Delete(da.GetData(),da.GetCount()); + } + void Free (){data_list.Free();} ///<清除数据,并释放内存 void Clear (){data_list.Clear();} ///<清除数据,但不释放内存