mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Unbreak with recent GCC (fix bad C++ code).
Approved by: fjoe (mentor, implicit)
This commit is contained in:
parent
5b31c42191
commit
ac54ae2dbe
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=120458
@ -39,10 +39,6 @@ LDFLAGS= -Wl,-export-dynamic -L${LOCALBASE}/lib -L${X11BASE}/lib \
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 502126
|
||||
BROKEN= "Does not compile on FreeBSD >= 5.x"
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
|
||||
BROKEN= "Does not compile on amd64 or ia64 (missing -fPIC from shared library objects)"
|
||||
.endif
|
||||
|
@ -8,3 +8,12 @@
|
||||
#include <tulip/TulipPlugin.h>
|
||||
|
||||
using namespace std;
|
||||
@@ -9,7 +10,7 @@
|
||||
};
|
||||
|
||||
namespace std {
|
||||
- struct less<edgeS>
|
||||
+ template <> struct less<edgeS>
|
||||
{
|
||||
bool operator()(const edgeS &c,const edgeS &d) const
|
||||
{
|
||||
|
11
graphics/tulip/files/patch-EqualValueClustering.cpp
Normal file
11
graphics/tulip/files/patch-EqualValueClustering.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
--- plugins/clustering/EqualValueClustering.cpp.orig Wed Apr 2 15:57:11 2003
|
||||
+++ plugins/clustering/EqualValueClustering.cpp Fri Oct 29 14:14:16 2004
|
||||
@@ -19,7 +19,7 @@
|
||||
{}
|
||||
|
||||
namespace STL_EXT_NS {
|
||||
- struct hash<double> {
|
||||
+ template <> struct hash<double> {
|
||||
size_t operator()(const double s) const { return (size_t)s; }
|
||||
};
|
||||
};
|
54
graphics/tulip/files/patch-GEM.h
Normal file
54
graphics/tulip/files/patch-GEM.h
Normal file
@ -0,0 +1,54 @@
|
||||
--- plugins/layout/GEM.h.orig Wed Apr 2 01:33:06 2003
|
||||
+++ plugins/layout/GEM.h Fri Oct 29 14:14:13 2004
|
||||
@@ -153,30 +153,30 @@
|
||||
* GEM Defualt Parameter Values
|
||||
*/
|
||||
|
||||
- static const float IMAXTEMPDEF = (float)1.0;
|
||||
- static const float ISTARTTEMPDEF = (float)0.3;
|
||||
- static const float IFINALTEMPDEF = (float)0.05;
|
||||
+ static const float IMAXTEMPDEF = 1.0;
|
||||
+ static const float ISTARTTEMPDEF = 0.3;
|
||||
+ static const float IFINALTEMPDEF = 0.05;
|
||||
static const int IMAXITERDEF = 10;
|
||||
- static const float IGRAVITYDEF = (float)0.05;
|
||||
- static const float IOSCILLATIONDEF = (float)0.4;
|
||||
- static const float IROTATIONDEF = (float)0.5;
|
||||
- static const float ISHAKEDEF = (float)0.2;
|
||||
- static const float AMAXTEMPDEF = (float)1.5;
|
||||
- static const float ASTARTTEMPDEF = (float)1.0;
|
||||
- static const float AFINALTEMPDEF = (float)0.02;
|
||||
+ static const float IGRAVITYDEF = 0.05;
|
||||
+ static const float IOSCILLATIONDEF = 0.4;
|
||||
+ static const float IROTATIONDEF = 0.5;
|
||||
+ static const float ISHAKEDEF = 0.2;
|
||||
+ static const float AMAXTEMPDEF = 1.5;
|
||||
+ static const float ASTARTTEMPDEF = 1.0;
|
||||
+ static const float AFINALTEMPDEF = 0.02;
|
||||
static const int AMAXITERDEF = 3;
|
||||
- static const float AGRAVITYDEF = (float)0.1;
|
||||
- static const float AOSCILLATIONDEF = (float)0.4;
|
||||
- static const float AROTATIONDEF = (float)0.9;
|
||||
- static const float ASHAKEDEF = (float)0.3;
|
||||
- static const float OMAXTEMPDEF = (float)0.25;
|
||||
- static const float OSTARTTEMPDEF = (float)1.0;
|
||||
- static const float OFINALTEMPDEF = (float)1.0;
|
||||
+ static const float AGRAVITYDEF = 0.1;
|
||||
+ static const float AOSCILLATIONDEF = 0.4;
|
||||
+ static const float AROTATIONDEF = 0.9;
|
||||
+ static const float ASHAKEDEF = 0.3;
|
||||
+ static const float OMAXTEMPDEF = 0.25;
|
||||
+ static const float OSTARTTEMPDEF = 1.0;
|
||||
+ static const float OFINALTEMPDEF = 1.0;
|
||||
static const int OMAXITERDEF = 3;
|
||||
- static const float OGRAVITYDEF = (float)0.1;
|
||||
- static const float OOSCILLATIONDEF = (float)0.4;
|
||||
- static const float OROTATIONDEF = (float)0.9;
|
||||
- static const float OSHAKEDEF = (float)0.3;
|
||||
+ static const float OGRAVITYDEF = 0.1;
|
||||
+ static const float OOSCILLATIONDEF = 0.4;
|
||||
+ static const float OROTATIONDEF = 0.9;
|
||||
+ static const float OSHAKEDEF = 0.3;
|
||||
|
||||
/*
|
||||
* Following parameters can be initialised in the original GEM
|
54
graphics/tulip/files/patch-GEM3D.h
Normal file
54
graphics/tulip/files/patch-GEM3D.h
Normal file
@ -0,0 +1,54 @@
|
||||
--- plugins/layout/GEM3D.h.orig Thu Feb 27 00:15:42 2003
|
||||
+++ plugins/layout/GEM3D.h Fri Oct 29 14:14:13 2004
|
||||
@@ -153,30 +153,30 @@
|
||||
* GEM3D Defualt Parameter Values
|
||||
*/
|
||||
|
||||
- static const float IMAXTEMPDEF = (float)1.0;
|
||||
- static const float ISTARTTEMPDEF = (float)0.3;
|
||||
- static const float IFINALTEMPDEF = (float)0.05;
|
||||
+ static const float IMAXTEMPDEF = 1.0;
|
||||
+ static const float ISTARTTEMPDEF = 0.3;
|
||||
+ static const float IFINALTEMPDEF = 0.05;
|
||||
static const int IMAXITERDEF = 10;
|
||||
- static const float IGRAVITYDEF = (float)0.05;
|
||||
- static const float IOSCILLATIONDEF = (float)0.4;
|
||||
- static const float IROTATIONDEF = (float)0.5;
|
||||
- static const float ISHAKEDEF = (float)0.2;
|
||||
- static const float AMAXTEMPDEF = (float)1.5;
|
||||
- static const float ASTARTTEMPDEF = (float)1.0;
|
||||
- static const float AFINALTEMPDEF = (float)0.02;
|
||||
+ static const float IGRAVITYDEF = 0.05;
|
||||
+ static const float IOSCILLATIONDEF = 0.4;
|
||||
+ static const float IROTATIONDEF = 0.5;
|
||||
+ static const float ISHAKEDEF = 0.2;
|
||||
+ static const float AMAXTEMPDEF = 1.5;
|
||||
+ static const float ASTARTTEMPDEF = 1.0;
|
||||
+ static const float AFINALTEMPDEF = 0.02;
|
||||
static const int AMAXITERDEF = 3;
|
||||
- static const float AGRAVITYDEF = (float)0.1;
|
||||
- static const float AOSCILLATIONDEF = (float)0.4;
|
||||
- static const float AROTATIONDEF = (float)0.9;
|
||||
- static const float ASHAKEDEF = (float)0.3;
|
||||
- static const float OMAXTEMPDEF = (float)0.25;
|
||||
- static const float OSTARTTEMPDEF = (float)1.0;
|
||||
- static const float OFINALTEMPDEF = (float)1.0;
|
||||
+ static const float AGRAVITYDEF = 0.1;
|
||||
+ static const float AOSCILLATIONDEF = 0.4;
|
||||
+ static const float AROTATIONDEF = 0.9;
|
||||
+ static const float ASHAKEDEF = 0.3;
|
||||
+ static const float OMAXTEMPDEF = 0.25;
|
||||
+ static const float OSTARTTEMPDEF = 1.0;
|
||||
+ static const float OFINALTEMPDEF = 1.0;
|
||||
static const int OMAXITERDEF = 3;
|
||||
- static const float OGRAVITYDEF = (float)0.1;
|
||||
- static const float OOSCILLATIONDEF = (float)0.4;
|
||||
- static const float OROTATIONDEF = (float)0.9;
|
||||
- static const float OSHAKEDEF = (float)0.3;
|
||||
+ static const float OGRAVITYDEF = 0.1;
|
||||
+ static const float OOSCILLATIONDEF = 0.4;
|
||||
+ static const float OROTATIONDEF = 0.9;
|
||||
+ static const float OSHAKEDEF = 0.3;
|
||||
|
||||
/*
|
||||
* Following parameters can be initialised in the original GEM3D
|
12
graphics/tulip/files/patch-Glyph.cpp
Normal file
12
graphics/tulip/files/patch-Glyph.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
--- library/tulip-ogl/src/Glyph.cpp.orig Tue Jan 28 16:44:37 2003
|
||||
+++ library/tulip-ogl/src/Glyph.cpp Fri Oct 29 14:14:08 2004
|
||||
@@ -16,7 +16,8 @@
|
||||
LOD=gc->LOD;
|
||||
}
|
||||
else {
|
||||
- (void *)superGraph = (void *)glGraph = (void *)NULL;
|
||||
+ superGraph = NULL;
|
||||
+ glGraph = NULL;
|
||||
LOD=LOF=0;
|
||||
}
|
||||
}
|
19
graphics/tulip/files/patch-GraphIterator.h
Normal file
19
graphics/tulip/files/patch-GraphIterator.h
Normal file
@ -0,0 +1,19 @@
|
||||
--- library/tulip/include/tulip/GraphIterator.h.orig Mon Jan 20 04:19:54 2003
|
||||
+++ library/tulip/include/tulip/GraphIterator.h Fri Oct 29 14:14:08 2004
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef TULIP_GGRAPHITERATOR_H
|
||||
#define TULIP_GGRAPHITERATOR_H
|
||||
#include "Iterator.h"
|
||||
+#include "SubGraph.h"
|
||||
#include "SuperGraph.h"
|
||||
#include "SuperGraphImpl.h"
|
||||
|
||||
@@ -26,7 +27,7 @@
|
||||
//typedef STL_EXT_NS::hash_map<node,std::pair< std::vector<edge> , std::vector<edge> > > nodesStruct;
|
||||
|
||||
class SelectionProxy;
|
||||
-class SubGraph;
|
||||
+//class SubGraph;
|
||||
//template<class C>class Iterator;
|
||||
|
||||
//===========================================================
|
11
graphics/tulip/files/patch-MultipleEdgeSelection.cpp
Normal file
11
graphics/tulip/files/patch-MultipleEdgeSelection.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
--- plugins/selection/MultipleEdgeSelection.cpp.orig Wed Apr 2 01:39:52 2003
|
||||
+++ plugins/selection/MultipleEdgeSelection.cpp Fri Oct 29 14:14:19 2004
|
||||
@@ -29,7 +29,7 @@
|
||||
};
|
||||
|
||||
namespace std {
|
||||
- struct less<edgeS> {
|
||||
+ template <> struct less<edgeS> {
|
||||
bool operator()(const edgeS &c,const edgeS &d) const {
|
||||
if (c.source.id<d.source.id) return true;
|
||||
if (c.source.id>d.source.id) return false;
|
15
graphics/tulip/files/patch-Property.h
Normal file
15
graphics/tulip/files/patch-Property.h
Normal file
@ -0,0 +1,15 @@
|
||||
--- library/tulip/include/tulip/Property.h.orig Mon Jan 20 23:40:43 2003
|
||||
+++ library/tulip/include/tulip/Property.h Fri Oct 29 14:14:08 2004
|
||||
@@ -46,8 +46,10 @@
|
||||
dataSet= context->dataSet;
|
||||
}
|
||||
else
|
||||
- (void *)dataSet=(void *)superGraph = (void *)propertyProxy = (void *)pluginProgress = (void *)NULL;
|
||||
-
|
||||
+ dataSet = NULL;
|
||||
+ superGraph = NULL;
|
||||
+ propertyProxy = NULL;
|
||||
+ pluginProgress = NULL;
|
||||
}
|
||||
///
|
||||
virtual ~Property(){}
|
20
graphics/tulip/files/patch-QuotientClustering.cpp
Normal file
20
graphics/tulip/files/patch-QuotientClustering.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
--- plugins/clustering/QuotientClustering.cpp.orig Wed Apr 2 01:33:06 2003
|
||||
+++ plugins/clustering/QuotientClustering.cpp Fri Oct 29 14:14:16 2004
|
||||
@@ -20,7 +20,7 @@
|
||||
};
|
||||
|
||||
namespace std {
|
||||
- struct less<edgeS> {
|
||||
+ template <> struct less<edgeS> {
|
||||
bool operator()(const edgeS &c,const edgeS &d) const {
|
||||
if (c.source<d.source) return true;
|
||||
if (c.source>d.source) return false;
|
||||
@@ -36,7 +36,7 @@
|
||||
QuotientClustering::~QuotientClustering(){}
|
||||
|
||||
namespace STL_EXT_NS {
|
||||
- struct hash<double> {
|
||||
+ template <> struct hash<double> {
|
||||
size_t operator()(const double s) const { return (size_t)s; }
|
||||
};
|
||||
};
|
@ -4,4 +4,13 @@
|
||||
+#include <sys/types.h>
|
||||
#include <sys/timeb.h>
|
||||
#include<qinputdialog.h>
|
||||
#include "TulipPlugin.h"
|
||||
#include <tulip/TulipPlugin.h>
|
||||
@@ -9,7 +10,7 @@
|
||||
};
|
||||
|
||||
namespace std {
|
||||
- struct less<edgeS>
|
||||
+ template <> struct less<edgeS>
|
||||
{
|
||||
bool operator()(const edgeS &c,const edgeS &d) const
|
||||
{
|
||||
|
@ -4,4 +4,13 @@
|
||||
+#include <sys/types.h>
|
||||
#include <sys/timeb.h>
|
||||
#include<qinputdialog.h>
|
||||
#include "TulipPlugin.h"
|
||||
#include <tulip/TulipPlugin.h>
|
||||
@@ -9,7 +10,7 @@
|
||||
};
|
||||
|
||||
namespace std {
|
||||
- struct less<edgeS> {
|
||||
+ template <> struct less<edgeS> {
|
||||
bool operator()(const edgeS &c,const edgeS &d) const {
|
||||
int cs,ct,ds,dt;
|
||||
if (c.source<=c.target) {
|
||||
|
11
graphics/tulip/files/patch-Reflect.cxx
Normal file
11
graphics/tulip/files/patch-Reflect.cxx
Normal file
@ -0,0 +1,11 @@
|
||||
--- library/tulip/include/tulip/cxx/Reflect.cxx.orig Fri Dec 6 21:39:53 2002
|
||||
+++ library/tulip/include/tulip/cxx/Reflect.cxx Fri Oct 29 14:14:08 2004
|
||||
@@ -29,7 +29,7 @@
|
||||
template<typename T> bool DataSet::getAndFree(const std::string &str,T& value) {
|
||||
if (get(str,value)) {
|
||||
delete ((T*)(data[str].value));
|
||||
- data.remove(str);
|
||||
+ data.erase(str);
|
||||
return true;
|
||||
}
|
||||
else
|
15
graphics/tulip/files/patch-Shape.h
Normal file
15
graphics/tulip/files/patch-Shape.h
Normal file
@ -0,0 +1,15 @@
|
||||
--- software/tlprender/src/Shape.h.orig Thu Dec 26 20:32:07 2002
|
||||
+++ software/tlprender/src/Shape.h Fri Oct 29 14:14:20 2004
|
||||
@@ -63,10 +63,10 @@
|
||||
} //namespace tlprender
|
||||
|
||||
namespace std {
|
||||
- struct less<tlprender::Shape *> {
|
||||
+ template <> struct less<tlprender::Shape *> {
|
||||
bool operator()(tlprender::Shape *&p1, tlprender::Shape *&p2);
|
||||
};
|
||||
- struct less<tlprender::Shape> {
|
||||
+ template <> struct less<tlprender::Shape> {
|
||||
bool operator()(const tlprender::Shape &p1, const tlprender::Shape &p2);
|
||||
};
|
||||
}
|
11
graphics/tulip/files/patch-SimpleVector.h
Normal file
11
graphics/tulip/files/patch-SimpleVector.h
Normal file
@ -0,0 +1,11 @@
|
||||
--- library/tulip/include/tulip/SimpleVector.h.orig Sat Nov 30 21:35:57 2002
|
||||
+++ library/tulip/include/tulip/SimpleVector.h Fri Oct 29 14:14:08 2004
|
||||
@@ -24,7 +24,7 @@
|
||||
explicit SimpleVector(size_t s) { begin=0; resize(s); }
|
||||
void resize(size_t s) {
|
||||
middleP=beginP+s;
|
||||
- if (middle>endP || size()<capacity()/2)
|
||||
+ if (this->middle>endP || size()<capacity()/2)
|
||||
doRealloc(size());
|
||||
}
|
||||
iterator begin() { return beginP; }
|
20
graphics/tulip/files/patch-StrahlerAllMetric.cpp
Normal file
20
graphics/tulip/files/patch-StrahlerAllMetric.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
--- plugins/metric/StrahlerAllMetric.cpp.orig Fri Dec 6 21:39:55 2002
|
||||
+++ plugins/metric/StrahlerAllMetric.cpp Fri Oct 29 14:14:17 2004
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
- struct equal_to<couple>
|
||||
+ template <> struct equal_to<couple>
|
||||
{
|
||||
bool operator()(const couple &c,const couple &d)
|
||||
{
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
- struct less<couple>
|
||||
+ template <> struct less<couple>
|
||||
{
|
||||
bool operator()(const couple &c,const couple &d)
|
||||
{
|
20
graphics/tulip/files/patch-StrahlerMetric.cpp
Normal file
20
graphics/tulip/files/patch-StrahlerMetric.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
--- plugins/metric/StrahlerMetric.cpp.orig Fri Dec 6 21:39:55 2002
|
||||
+++ plugins/metric/StrahlerMetric.cpp Fri Oct 29 14:14:17 2004
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
- struct equal_to<couple> {
|
||||
+ template <> struct equal_to<couple> {
|
||||
bool operator()(const couple &c,const couple &d)
|
||||
{
|
||||
if ((c.r==d.r) && (c.p==d.p)) return true;
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
- struct less<couple>
|
||||
+ template <> struct less<couple>
|
||||
{
|
||||
bool operator()(const couple &c,const couple &d) {
|
||||
if (c.r<d.r) return true;
|
23
graphics/tulip/files/patch-SuperGraph.h
Normal file
23
graphics/tulip/files/patch-SuperGraph.h
Normal file
@ -0,0 +1,23 @@
|
||||
--- library/tulip/include/tulip/SuperGraph.h.orig Tue Apr 29 16:37:58 2003
|
||||
+++ library/tulip/include/tulip/SuperGraph.h Fri Oct 29 14:14:08 2004
|
||||
@@ -50,14 +50,14 @@
|
||||
};
|
||||
|
||||
namespace STL_EXT_NS {
|
||||
-struct hash<node>{size_t operator()(const node n) const {return n.id;}};
|
||||
-struct hash<edge>{size_t operator()(const edge e) const {return e.id;}};
|
||||
+template <> struct hash<node>{size_t operator()(const node n) const {return n.id;}};
|
||||
+template <> struct hash<edge>{size_t operator()(const edge e) const {return e.id;}};
|
||||
}
|
||||
namespace std {
|
||||
-struct equal_to<node>{size_t operator()(const node n,const node n2) const {return n.id==n2.id;}};
|
||||
-struct equal_to<edge>{size_t operator()(const edge e,const edge e2) const {return e.id==e2.id;}};
|
||||
-struct less<node>{size_t operator()(const node n,const node n2) const {return n.id<n2.id;}};
|
||||
-struct less<edge>{size_t operator()(const edge e,const edge e2) const {return e.id<e2.id;}};
|
||||
+template <> struct equal_to<node>{size_t operator()(const node n,const node n2) const {return n.id==n2.id;}};
|
||||
+template <> struct equal_to<edge>{size_t operator()(const edge e,const edge e2) const {return e.id==e2.id;}};
|
||||
+template <> struct less<node>{size_t operator()(const node n,const node n2) const {return n.id<n2.id;}};
|
||||
+template <> struct less<edge>{size_t operator()(const edge e,const edge e2) const {return e.id<e2.id;}};
|
||||
}
|
||||
|
||||
|
166
graphics/tulip/files/patch-Vector.cxx
Normal file
166
graphics/tulip/files/patch-Vector.cxx
Normal file
@ -0,0 +1,166 @@
|
||||
--- library/tulip-geo/include/tulip/cxx/Vector.cxx.orig Wed Apr 2 01:30:26 2003
|
||||
+++ library/tulip-geo/include/tulip/cxx/Vector.cxx Fri Oct 29 14:14:08 2004
|
||||
@@ -1,15 +1,17 @@
|
||||
+//#include <iostream>
|
||||
+
|
||||
#define VECTORTLP tlp::geo::Vector<Obj,SIZE>
|
||||
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator*=(const Obj &scalaire) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]*=scalaire;
|
||||
+ this->array[i]*=scalaire;
|
||||
return (*this);
|
||||
}
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator*=(const VECTORTLP &vecto) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]*=vecto[i];
|
||||
+ this->array[i]*=vecto[i];
|
||||
return (*this);
|
||||
}
|
||||
|
||||
@@ -17,14 +19,14 @@
|
||||
VECTORTLP & VECTORTLP::operator/=(const Obj &scalaire) {
|
||||
assert(scalaire!=0);
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]/=scalaire;
|
||||
+ this->array[i]/=scalaire;
|
||||
return (*this);
|
||||
}
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator/=(const VECTORTLP &vecto) {
|
||||
for (unsigned int i=0;i<SIZE;++i) {
|
||||
assert(vecto[i]!=0);
|
||||
- array[i]/=vecto[i];
|
||||
+ this->array[i]/=vecto[i];
|
||||
}
|
||||
return (*this);
|
||||
}
|
||||
@@ -32,26 +34,26 @@
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator+=(const Obj &scalaire) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]+=scalaire;
|
||||
+ this->array[i]+=scalaire;
|
||||
return (*this);
|
||||
}
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator+=(const VECTORTLP &vecto) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]+=vecto[i];
|
||||
+ this->array[i]+=vecto[i];
|
||||
return (*this);
|
||||
}
|
||||
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator-=(const Obj &scalaire) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]-=scalaire;
|
||||
+ this->array[i]-=scalaire;
|
||||
return (*this);
|
||||
}
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::operator-=(const VECTORTLP &vecto) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]-=vecto[i];
|
||||
+ this->array[i]-=vecto[i];
|
||||
return (*this);
|
||||
}
|
||||
|
||||
@@ -96,13 +98,13 @@
|
||||
VECTORTLP result;
|
||||
switch(SIZE){
|
||||
case 3:
|
||||
- result[0]=array[1]*v[2]-array[2]*v[1];
|
||||
- result[1]=array[2]*v[0]-array[0]*v[2];
|
||||
- result[2]=array[0]*v[1]-array[1]*v[0];
|
||||
+ result[0]=this->array[1]*v[2]-this->array[2]*v[1];
|
||||
+ result[1]=this->array[2]*v[0]-this->array[0]*v[2];
|
||||
+ result[2]=this->array[0]*v[1]-this->array[1]*v[0];
|
||||
return result;
|
||||
break;
|
||||
default :
|
||||
- std::cerr << "cross product not implemented for dimension :" << SIZE << endl;
|
||||
+ std::cerr << "cross product not implemented for dimension :" << SIZE << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -110,14 +112,14 @@
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
bool VECTORTLP::operator!=(const VECTORTLP &vecto) const {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- if (array[i]!=vecto[i]) return true;
|
||||
+ if (this->array[i]!=vecto[i]) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
bool VECTORTLP::operator==(const VECTORTLP &vecto) const {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- if (array[i]!=vecto[i]) return false;
|
||||
+ if (this->array[i]!=vecto[i]) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -126,16 +128,16 @@
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
Obj VECTORTLP::dotProduct(const VECTORTLP &v) const{
|
||||
assert (SIZE>0);
|
||||
- Obj tmpO= array[0] * v[0];
|
||||
+ Obj tmpO= this->array[0] * v[0];
|
||||
for (unsigned int i=1;i<SIZE;++i)
|
||||
- tmpO+= array[i] * v[i];
|
||||
+ tmpO+= this->array[i] * v[i];
|
||||
return tmpO;
|
||||
}
|
||||
|
||||
template <typename Obj,unsigned int SIZE>
|
||||
VECTORTLP & VECTORTLP::fill(const Obj& scalaire) {
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- array[i]=scalaire;
|
||||
+ this->array[i]=scalaire;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
@@ -143,17 +145,17 @@
|
||||
Obj VECTORTLP::norm() const{
|
||||
switch(SIZE){
|
||||
case 1:
|
||||
- return array[0];
|
||||
+ return this->array[0];
|
||||
case 2:
|
||||
- return sqrt(array[0]*array[0]+array[1]*array[1]);
|
||||
+ return sqrt(this->array[0]*this->array[0]+this->array[1]*this->array[1]);
|
||||
break;
|
||||
case 3:
|
||||
- return sqrt(array[0]*array[0]+array[1]*array[1]+array[2]*array[2]);
|
||||
+ return sqrt(this->array[0]*this->array[0]+this->array[1]*this->array[1]+this->array[2]*this->array[2]);
|
||||
break;
|
||||
default :
|
||||
Obj tmp=0;
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- tmp+=array[i]*array[i];
|
||||
+ tmp+=this->array[i]*this->array[i];
|
||||
return(sqrt(tmp));
|
||||
break;
|
||||
}
|
||||
@@ -165,15 +167,15 @@
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
- return sqrt((array[0]-c.array[0])*(array[0]-c.array[0])+(array[1]-c.array[1])*(array[1]-c.array[1]));
|
||||
+ return sqrt((this->array[0]-c.array[0])*(this->array[0]-c.array[0])+(this->array[1]-c.array[1])*(this->array[1]-c.array[1]));
|
||||
break;
|
||||
case 3:
|
||||
- return sqrt((array[0]-c.array[0])*(array[0]-c.array[0])+(array[1]-c.array[1])*(array[1]-c.array[1])+(array[2]-c.array[2])*(array[2]-c.array[2]));
|
||||
+ return sqrt((this->array[0]-c.array[0])*(this->array[0]-c.array[0])+(this->array[1]-c.array[1])*(this->array[1]-c.array[1])+(this->array[2]-c.array[2])*(this->array[2]-c.array[2]));
|
||||
break;
|
||||
default :
|
||||
Obj tmp=0;
|
||||
for (unsigned int i=0;i<SIZE;++i)
|
||||
- tmp+=(array[i]-c.array[i])*(array[i]-c.array[i]);
|
||||
+ tmp+=(this->array[i]-c.array[i])*(this->array[i]-c.array[i]);
|
||||
return(sqrt(tmp));
|
||||
break;
|
||||
}
|
11
graphics/tulip/files/patch-tulipconf.h
Normal file
11
graphics/tulip/files/patch-tulipconf.h
Normal file
@ -0,0 +1,11 @@
|
||||
--- library/tulip/include/tulip/tulipconf.h.orig Thu Mar 13 20:20:34 2003
|
||||
+++ library/tulip/include/tulip/tulipconf.h Fri Oct 29 14:14:08 2004
|
||||
@@ -8,7 +8,7 @@
|
||||
#else
|
||||
# define STL_EXT_NS __gnu_cxx
|
||||
# define _DEPRECATED __attribute__ ((deprecated))
|
||||
-# include <ext/stl_hash_fun.h>
|
||||
+# include <ext/hash_fun.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
Loading…
Reference in New Issue
Block a user