[Bf-blender-cvs] [5893a34] master: Use prepend instead of append (avoids list search)

Campbell Barton noreply at git.blender.org
Fri Jun 12 09:14:39 CEST 2015


Commit: 5893a3445e8227689c2f10b958a79f5f6ec18d20
Author: Campbell Barton
Date:   Fri Jun 12 16:11:37 2015 +1000
Branches: master
https://developer.blender.org/rB5893a3445e8227689c2f10b958a79f5f6ec18d20

Use prepend instead of append (avoids list search)

===================================================================

M	source/blender/editors/mesh/mesh_navmesh.c

===================================================================

diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 0d9f6f2..1c36826 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -84,7 +84,7 @@ static void createVertsTrisData(bContext *C, LinkNode *obs,
 	for (oblink = obs; oblink; oblink = oblink->next) {
 		ob = (Object *) oblink->link;
 		dm = mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH);
-		BLI_linklist_append(&dms, (void *)dm);
+		BLI_linklist_prepend(&dms, dm);
 
 		nverts += dm->getNumVerts(dm);
 		nfaces = dm->getNumTessFaces(dm);
@@ -451,7 +451,7 @@ static int navmesh_create_exec(bContext *C, wmOperator *op)
 				}
 			}
 			else {
-				BLI_linklist_append(&obs, (void *)base->object);
+				BLI_linklist_prepend(&obs, base->object);
 			}
 		}
 	}




More information about the Bf-blender-cvs mailing list