tmp=0;
if(!new_elems_left.empty())
tmp=&(new_elems_left[0]);
- _left=new BBTree(bbs, tmp, level+1, new_elems_left.size(),_epsilon);
+ _left=new BBTree(bbs, tmp, level+1, (int)new_elems_left.size(),_epsilon);
tmp=0;
if(!new_elems_right.empty())
tmp=&(new_elems_right[0]);
- _right=new BBTree(bbs, tmp, level+1, new_elems_right.size(),_epsilon);
+ _right=new BBTree(bbs, tmp, level+1, (int)new_elems_right.size(),_epsilon);
}
public:
ComposedEdge() { }
ComposedEdge(const ComposedEdge& other);
- ComposedEdge(int size):_sub_edges(size) { }
+ ComposedEdge(int sz):_sub_edges(sz) { }
static void Delete(ComposedEdge *pt) { delete pt; }
static void SoftDelete(ComposedEdge *pt) { pt->_sub_edges.clear(); delete pt; }
void reverse();
- int recursiveSize() const { return _sub_edges.size(); }
+ int recursiveSize() const { return (int)_sub_edges.size(); }
void initLocations() const;
ComposedEdge *clone() const;
bool isNodeIn(Node *n) const;
void pushBack(Edge *edge, bool direction=true);
void pushBack(ElementaryEdge *elem);
void pushBack(ComposedEdge *elem);
- int size() const { return _sub_edges.size(); }
+ int size() const { return (int)_sub_edges.size(); }
ElementaryEdge *operator[](int i) const;
Node *getEndNode() const;
Node *getStartNode() const;
x=x+V[2*i];
y=y+V[2*i+1];
}
- double A=2*x/taille;
- double B=2*y/taille;
+ double A=2*x/((double)taille);
+ double B=2*y/((double)taille);
Bary.push_back(A);//taille vecteur=2*nb de points.
Bary.push_back(B);
inline std::vector<double> reconstruct_polygon(const std::vector<double>& V)
{
- int taille=V.size();
+ std::size_t taille=V.size();
//VB : why 6 ?
COS[0]=1.0;
SIN[0]=0.0;
//angle[0]=0.0;
- for(int i=0; i<taille/2-1;i++)
+ for(std::size_t i=0; i<taille/2-1;i++)
{
std::vector<double> Trigo=calcul_cos_et_sin(&Bary[0],&V[0],&V[2*(i+1)]);
COS[i+1]=Trigo[0];
Pt_ordonne.reserve(taille);
// std::multimap<double,int> Ordre;
std::multimap<std::pair<double,double>,int, AngleLess> CosSin;
- for(int i=0;i<taille/2;i++)
+ for(std::size_t i=0;i<taille/2;i++)
{
// Ordre.insert(std::make_pair(angle[i],i));
CosSin.insert(std::make_pair(std::make_pair(SIN[i],COS[i]),i));
V[2]=AB[0]*AC[1]-AB[1]*AC[0];
}
template<> inline
- void crossprod<1>( const double * A, const double * B, const double * C, double * V)
+ void crossprod<1>( const double * /*A*/, const double * /*B*/, const double * /*C*/, double * /*V*/)
{
// just to be able to compile
}
template<class ConnType, NumberingPolicy numPol>
inline double calculateVolumeForPolyh2(const ConnType *connec, int lgth, const double *coords)
{
- int nbOfFaces=std::count(connec,connec+lgth,-1)+1;
+ std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1;
double volume=0.;
const int *work=connec;
- for(int iFace=0;iFace<nbOfFaces;iFace++)
+ for(std::size_t iFace=0;iFace<nbOfFaces;iFace++)
{
const int *work2=std::find(work+1,connec+lgth,-1);
- int nbOfNodesOfCurFace=std::distance(work,work2);
+ std::size_t nbOfNodesOfCurFace=std::distance(work,work2);
double areaVector[3]={0.,0.,0.};
- for(int ptId=0;ptId<nbOfNodesOfCurFace;ptId++)
+ for(std::size_t ptId=0;ptId<nbOfNodesOfCurFace;ptId++)
{
const double *pti=coords+3*OTT<ConnType,numPol>::coo2C(work[ptId]);
const double *pti1=coords+3*OTT<ConnType,numPol>::coo2C(work[(ptId+1)%nbOfNodesOfCurFace]);
template<class ConnType, NumberingPolicy numPol>
inline void barycenterOfPolyhedron(const ConnType *connec, int lgth, const double *coords, double *res)
{
- int nbOfFaces=std::count(connec,connec+lgth,-1)+1;
+ std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1;
res[0]=0.; res[1]=0.; res[2]=0.;
const int *work=connec;
- for(int i=0;i<nbOfFaces;i++)
+ for(std::size_t i=0;i<nbOfFaces;i++)
{
const int *work2=std::find(work+1,connec+lgth,-1);
- int nbOfNodesOfCurFace=std::distance(work,work2);
+ int nbOfNodesOfCurFace=(int)std::distance(work,work2);
// projection to (u,v) of each faces of polyh to compute integral(x^2/2) on each faces.
double normal[3];
areaVectorOfPolygon<ConnType,numPol>(work,nbOfNodesOfCurFace,coords,normal);
}
template<>
- inline void calculateBarycenter<2,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<2,0>(const double **/*pts*/, double */*bary*/)
{
}
template<>
- inline void calculateBarycenter<3,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<3,0>(const double **/*pts*/, double */*bary*/)
{
}
template<>
- inline void calculateBarycenter<4,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<4,0>(const double **/*pts*/, double */*bary*/)
{
}
template<>
- inline void calculateBarycenter<5,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<5,0>(const double **/*pts*/, double */*bary*/)
{
}
template<>
- inline void calculateBarycenter<6,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<6,0>(const double **/*pts*/, double */*bary*/)
{
}
template<>
- inline void calculateBarycenter<7,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<7,0>(const double **/*pts*/, double */*bary*/)
{
}
template<>
- inline void calculateBarycenter<8,0>(const double **pts, double *bary)
+ inline void calculateBarycenter<8,0>(const double **/*pts*/, double */*bary*/)
{
}