[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59187] trunk/blender/source/blender: replace calls to BLI_linklist_append with BLI_linklist_prepend where order us unimportant , since append steps over the whole list each time.
Campbell Barton
ideasman42 at gmail.com
Fri Aug 16 15:06:40 CEST 2013
Revision: 59187
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59187
Author: campbellbarton
Date: 2013-08-16 13:06:40 +0000 (Fri, 16 Aug 2013)
Log Message:
-----------
replace calls to BLI_linklist_append with BLI_linklist_prepend where order us unimportant, since append steps over the whole list each time.
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/writefile.c
trunk/blender/source/blender/gpu/intern/gpu_draw.c
Modified: trunk/blender/source/blender/blenloader/intern/writefile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/writefile.c 2013-08-16 13:02:34 UTC (rev 59186)
+++ trunk/blender/source/blender/blenloader/intern/writefile.c 2013-08-16 13:06:40 UTC (rev 59187)
@@ -2421,8 +2421,8 @@
* 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;
Modified: trunk/blender/source/blender/gpu/intern/gpu_draw.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_draw.c 2013-08-16 13:02:34 UTC (rev 59186)
+++ trunk/blender/source/blender/gpu/intern/gpu_draw.c 2013-08-16 13:06:40 UTC (rev 59187)
@@ -1216,7 +1216,7 @@
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);
}
More information about the Bf-blender-cvs
mailing list