[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50718] trunk/blender/source/blender: fix own error BLI_rctf_cent_x/y were incorrectly returning int's, also quiet some warnings.

Campbell Barton ideasman42 at gmail.com
Tue Sep 18 10:00:19 CEST 2012


Revision: 50718
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50718
Author:   campbellbarton
Date:     2012-09-18 08:00:19 +0000 (Tue, 18 Sep 2012)
Log Message:
-----------
fix own error BLI_rctf_cent_x/y were incorrectly returning int's, also quiet some warnings.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_rect.h
    trunk/blender/source/blender/compositor/intern/COM_NodeBase.h
    trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h
    trunk/blender/source/blender/editors/include/ED_mesh.h
    trunk/blender/source/blender/editors/mesh/editmesh_bvh.c

Modified: trunk/blender/source/blender/blenlib/BLI_rect.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_rect.h	2012-09-18 07:14:16 UTC (rev 50717)
+++ trunk/blender/source/blender/blenlib/BLI_rect.h	2012-09-18 08:00:19 UTC (rev 50718)
@@ -90,8 +90,8 @@
 BLI_INLINE float BLI_rcti_cent_y_fl(const struct rcti *rct) { return (float)(rct->ymin + rct->ymax) / 2.0f; }
 BLI_INLINE int   BLI_rcti_cent_x(const struct rcti *rct) { return (rct->xmin + rct->xmax) / 2; }
 BLI_INLINE int   BLI_rcti_cent_y(const struct rcti *rct) { return (rct->ymin + rct->ymax) / 2; }
-BLI_INLINE int   BLI_rctf_cent_x(const struct rctf *rct) { return (rct->xmin + rct->xmax) / 2.0f; }
-BLI_INLINE int   BLI_rctf_cent_y(const struct rctf *rct) { return (rct->ymin + rct->ymax) / 2.0f; }
+BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct) { return (rct->xmin + rct->xmax) / 2.0f; }
+BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct) { return (rct->ymin + rct->ymax) / 2.0f; }
 
 BLI_INLINE int   BLI_rcti_size_x(const struct rcti *rct) { return (rct->xmax - rct->xmin); }
 BLI_INLINE int   BLI_rcti_size_y(const struct rcti *rct) { return (rct->ymax - rct->ymin); }

Modified: trunk/blender/source/blender/compositor/intern/COM_NodeBase.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_NodeBase.h	2012-09-18 07:14:16 UTC (rev 50717)
+++ trunk/blender/source/blender/compositor/intern/COM_NodeBase.h	2012-09-18 08:00:19 UTC (rev 50718)
@@ -97,7 +97,7 @@
 	 * @return [true:false]
 	 * @see NodeOperation
 	 */
-	virtual const int isOperation() const { return false; }
+	virtual const bool isOperation() const { return false; }
 	
 	/**
 	 * @brief check if this is an input node

Modified: trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h	2012-09-18 07:14:16 UTC (rev 50717)
+++ trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h	2012-09-18 08:00:19 UTC (rev 50718)
@@ -88,7 +88,7 @@
 	 * @return [true:false]
 	 * @see NodeBase
 	 */
-	const int isOperation() const { return true; }
+	const bool isOperation() const { return true; }
 
 	/**
 	 * @brief determine the resolution of this node

Modified: trunk/blender/source/blender/editors/include/ED_mesh.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_mesh.h	2012-09-18 07:14:16 UTC (rev 50717)
+++ trunk/blender/source/blender/editors/include/ED_mesh.h	2012-09-18 08:00:19 UTC (rev 50718)
@@ -148,7 +148,7 @@
 int  EDBM_select_pick(struct bContext *C, const int mval[2], short extend, short deselect, short toggle);
 
 void EDBM_selectmode_set(struct BMEditMesh *em);
-void EDBM_selectmode_convert(struct BMEditMesh *em, short oldmode, const short selectmode);
+void EDBM_selectmode_convert(struct BMEditMesh *em, short selectmode_old, const short selectmode_new);
 
 void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select);
 

Modified: trunk/blender/source/blender/editors/mesh/editmesh_bvh.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_bvh.c	2012-09-18 07:14:16 UTC (rev 50717)
+++ trunk/blender/source/blender/editors/mesh/editmesh_bvh.c	2012-09-18 08:00:19 UTC (rev 50718)
@@ -309,7 +309,7 @@
 	}
 }
 
-BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, const float co[3], float maxdist)
+BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, const float co[3], const float maxdist)
 {
 	BVHTreeNearest hit;
 
@@ -325,7 +325,7 @@
 		float dist, curdist = tree->maxdist, v[3];
 		int cur = 0, i;
 
-		maxdist = tree->maxdist;
+		/* maxdist = tree->maxdist; */  /* UNUSED */
 
 		for (i = 0; i < 3; i++) {
 			sub_v3_v3v3(v, hit.co, ls[i]->v->co);




More information about the Bf-blender-cvs mailing list