diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-23 21:53:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-23 21:53:44 +0000 |
commit | 10fa9a24ced9d0a37722c53846c1a0bd94047412 (patch) | |
tree | 448093c2b54b1056054c7e8da626a573b45c1430 /src | |
parent | 34930aff095fe54011f9a42b47b1ad61145d48b9 (diff) |
- fix for LIST<T>.ListCopy()
- minor fix for TTB options
git-svn-id: http://svn.miranda-ng.org/main/trunk@593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-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)
{
|