Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-16 17:06:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-16 17:06:40 +0400
commitfd7bffa3c5276229a0ca06e4ff59319fbfc674f9 (patch)
treeefb4b73b9614d41f693009d35acacfe074455cd6 /source
parent1677758e459dbbbc0ad8bd2cd87bfaf925414952 (diff)
replace calls to BLI_linklist_append with BLI_linklist_prepend where order us unimportant, since append steps over the whole list each time.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/writefile.c4
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index f3d58c42bc8..b7254ffe1a9 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2421,8 +2421,8 @@ static void write_soops(WriteData *wd, SpaceOops *so, LinkNode **tmp_mem_list)
* outliners in a screen we might get the same address on the next
* malloc, which makes the address no longer unique and so invalid for
* lookups on file read, causing crashes or double frees */
- BLI_linklist_append(tmp_mem_list, ts_flat);
- BLI_linklist_append(tmp_mem_list, data);
+ BLI_linklist_prepend(tmp_mem_list, ts_flat);
+ BLI_linklist_prepend(tmp_mem_list, data);
}
else {
so->treestore = NULL;
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index e9f9d4a3379..0d25d988df9 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1216,7 +1216,7 @@ static LinkNode *image_free_queue = NULL;
static void gpu_queue_image_for_free(Image *ima)
{
BLI_lock_thread(LOCK_OPENGL);
- BLI_linklist_append(&image_free_queue, ima);
+ BLI_linklist_prepend(&image_free_queue, ima);
BLI_unlock_thread(LOCK_OPENGL);
}