[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54575] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: Fix compilation on linux (with gcc4.7).

Bastien Montagne montagne29 at wanadoo.fr
Fri Feb 15 12:23:08 CET 2013


Revision: 54575
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54575
Author:   mont29
Date:     2013-02-15 11:23:07 +0000 (Fri, 15 Feb 2013)
Log Message:
-----------
Fix compilation on linux (with gcc4.7).

Without const, I had the following error:

/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp: In function ?\226?\128?\152PyObject* ViewMap_scene_bbox_get(BPy_ViewMap*, void*)?\226?\128?\153:
/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:120:54: error: invalid initialization of non-const reference of type ?\226?\128?\152BBox<VecMat::Vec3<double> >&?\226?\128?\153 from an rvalue of type ?\226?\128?\152BBox<VecMat::Vec3<double> >?\226?\128?\153
In file included from /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:3:0:
/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_Convert.h:81:12: error: in passing argument 1 of ?\226?\128?\152PyObject* BPy_BBox_from_BBox(BBox<VecMat::Vec3<double> >&)?\226?\128?\153
/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:121:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [source/blender/freestyle/CMakeFiles/bf_freestyle.dir/intern/python/BPy_ViewMap.cpp.o] Erreur 1

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp	2013-02-15 09:15:14 UTC (rev 54574)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp	2013-02-15 11:23:07 UTC (rev 54575)
@@ -281,7 +281,7 @@
 	return py_tv;
 }
 
-PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ) {
+PyObject * BPy_BBox_from_BBox(const BBox< Vec3r > &bb) {
 	PyObject *py_bb = BBox_Type.tp_new( &BBox_Type, 0, 0 );
 	((BPy_BBox *) py_bb)->bb = new BBox< Vec3r >( bb );
 

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h	2013-02-15 09:15:14 UTC (rev 54574)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h	2013-02-15 11:23:07 UTC (rev 54575)
@@ -78,7 +78,7 @@
 PyObject * Any_BPy_FEdge_from_FEdge( FEdge& fe );
 PyObject * Any_BPy_ViewVertex_from_ViewVertex( ViewVertex& vv );
 
-PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb );
+PyObject * BPy_BBox_from_BBox(const BBox< Vec3r > &bb);
 PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp );
 PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve );
 PyObject * BPy_FEdge_from_FEdge( FEdge& fe );




More information about the Bf-blender-cvs mailing list