[Bf-blender-cvs] [54d069b] soc-2014-shapekey: Fix compilation on gcc (minimalist changes, only tackled errors, not warnings).

Bastien Montagne noreply at git.blender.org
Thu Jun 19 13:51:34 CEST 2014


Commit: 54d069b5931442a033dc847e6de7cf1061eeb92d
Author: Bastien Montagne
Date:   Thu Jun 19 13:49:34 2014 +0200
https://developer.blender.org/rB54d069b5931442a033dc847e6de7cf1061eeb92d

Fix compilation on gcc (minimalist changes, only tackled errors, not warnings).

Fixed two cases of 'code before var declarations'.
Did not touch to missing 'static' for functions, nor 'UNUSED' parameters...

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

M	source/blender/blenkernel/intern/key.c

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

diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 03c6422..a924507 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -2103,12 +2103,12 @@ void BKE_key_init_scratch(Object *ob)
 
 void BKE_key_editdata_to_scratch(Object *ob, bool indeces_in_sync)
 {
-	BLI_assert(ELEM3(ob->type, OB_MESH, OB_LATTICE, OB_CURVE));
-	BLI_assert(ob->mode == OB_MODE_EDIT);
-	
 	Key *k = BKE_key_from_object(ob);
 	ScratchKeyBlock *skb = &k->scratch;
-	
+
+	BLI_assert(ELEM3(ob->type, OB_MESH, OB_LATTICE, OB_CURVE));
+	BLI_assert(ob->mode == OB_MODE_EDIT);
+
 	if (ob->type == OB_MESH) {
 		Mesh *m = ob->data;
 		BMesh *bm = m->edit_btmesh->bm;
@@ -2148,11 +2148,11 @@ void BKE_key_editdata_to_scratch(Object *ob, bool indeces_in_sync)
 
 void BKE_key_editdata_from_scratch(Object *ob)
 {
+	ScratchKeyBlock *skb = &BKE_key_from_object(ob)->scratch;
+
 	BLI_assert(ELEM3(ob->type, OB_MESH, OB_LATTICE, OB_CURVE));
 	BLI_assert(ob->mode == OB_MODE_EDIT);
 
-	ScratchKeyBlock *skb = &BKE_key_from_object(ob)->scratch;
-
 	if (ob->type == OB_MESH) {
 		Mesh *m = ob->data;
 		BMesh *bm = m->edit_btmesh->bm;




More information about the Bf-blender-cvs mailing list