freebsd-ports/graphics/nurbs++/files/patch-nurbs.cpp
Pav Lucistnik 95465b01db - Unbreak on 5.X and above: fix compile with gcc34
PR:		ports/106117
Submitted by:	Peter Johnson <johnson.peter@gmail.com>
2006-12-01 09:55:32 +00:00

42 lines
1.1 KiB
C++

--- nurbs/nurbs.cpp.orig Fri May 24 10:25:49 2002
+++ nurbs/nurbs.cpp Fri Dec 1 00:22:20 2006
@@ -28,7 +28,7 @@
#include <nurbsS.h>
#include "integrate.h"
-#include <malloc.h>
+#include <stdlib.h>
/*!
*/
@@ -391,9 +391,9 @@
T du,dv ;
// compute a coarse distance for the curve
Point_nD<T,N> a,b,c ;
- a = pointAt(0.0) ;
- b = pointAt(0.5) ;
- c = pointAt(1.0) ;
+ a = this->pointAt(0.0) ;
+ b = this->pointAt(0.5) ;
+ c = this->pointAt(1.0) ;
T distance = norm(b-a) + norm(c-b) ;
@@ -5202,7 +5202,7 @@
*/
template <class T, int N>
BasicList<Point_nD<T,N> > NurbsCurve<T,N>::tesselate(T tolerance,BasicList<T> *uk) const {
- BasicList<Point_nD<T,N> > list,list2 ;
+ BasicList<Point_nD<T,N> > list, list2 ;
NurbsCurveArray<T,N> ca ;
decompose(ca) ;
@@ -5249,7 +5249,7 @@
}
else{
for(int i=0;i<ca.n();++i){
- list2 = ca[i].tesselate(tolerance,uk) ;
+ list2 = ca[i].tesselate(tolerance,uk).by_ref() ;
// remove the last point from the list to elliminate
list.erase((BasicNode<Point_nD<T,N> >*)list.last()) ;