diff options
Diffstat (limited to 'src/modules/database/dblists.cpp')
-rw-r--r-- | src/modules/database/dblists.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modules/database/dblists.cpp b/src/modules/database/dblists.cpp index 1dd802c196..bd1d352641 100644 --- a/src/modules/database/dblists.cpp +++ b/src/modules/database/dblists.cpp @@ -257,16 +257,12 @@ int List_RemovePtr(SortedList* list, void* p) void List_Copy(SortedList* s, SortedList* d, size_t itemSize)
{
- int i;
-
d->increment = s->increment;
- d->sortFunc = s->sortFunc;
-
- for (i = 0; i < s->realCount; i++) {
- void* item = mir_alloc(itemSize);
- memcpy(item, s->items[i], itemSize);
- List_Insert(d, item, i);
-} }
+ d->limit = s->limit;
+ d->realCount = s->realCount;
+ d->items = (void**)mir_alloc( sizeof(void*) * d->realCount);
+ memcpy(d->items, s->items, sizeof(void*) * d->realCount);
+}
void List_ObjCopy(SortedList* s, SortedList* d, size_t itemSize)
{
|