Initialize data members in default constructors (e.g. Pos<FaceType> pos; pos.IsNull() now can't be false).

This commit is contained in:
giorgiomarcias 2014-06-15 21:29:45 +00:00
parent 5e579abc59
commit c1f34b6517
3 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ public:
/// Local index of the vertex /// Local index of the vertex
int z; int z;
/// Default Constructor /// Default Constructor
VertexStar() {} VertexStar() : e(0), z(0) {}
/// Constructor which associates the EdgePos elementet with a face and its edge /// Constructor which associates the EdgePos elementet with a face and its edge
VertexStar(EDGETYPE * const ep, int const zp) VertexStar(EDGETYPE * const ep, int const zp)
{ {

View File

@ -71,7 +71,7 @@ public:
VertexType *v; VertexType *v;
/// Default constructor /// Default constructor
Pos(){} Pos() : f(0), z(-1), v(0) {}
/// Constructor which associates the half-edge element with a face, its edge and its vertex /// Constructor which associates the half-edge element with a face, its edge and its vertex
/// \note that the input must be consistent, e.g. it should hold that \c vp==fp->V0(zp) or \c vp==fp->V1(zp) /// \note that the input must be consistent, e.g. it should hold that \c vp==fp->V0(zp) or \c vp==fp->V1(zp)
Pos(FaceType * const fp, int const zp, VertexType * const vp) Pos(FaceType * const fp, int const zp, VertexType * const vp)
@ -414,7 +414,7 @@ public:
int z; int z;
/// Default constructor /// Default constructor
VFIterator(){} VFIterator() : f(0), z(-1) {}
/// Constructor which associates the half-edge elementet with a face and its vertex /// Constructor which associates the half-edge elementet with a face and its vertex
VFIterator(FaceType * _f, const int & _z){f = _f; z = _z; assert(z>=0 && "VFAdj must be initialized");} VFIterator(FaceType * _f, const int & _z){f = _f; z = _z; assert(z>=0 && "VFAdj must be initialized");}

View File

@ -54,7 +54,7 @@ private:
int _vi; int _vi;
/// Default Constructor /// Default Constructor
public: public:
VTIterator(){} VTIterator() : _vt(0), _vi(-1){}
/// Constructor which associates the EdgePos elementet with a face and its edge /// Constructor which associates the EdgePos elementet with a face and its edge
VTIterator(TetraType * const tp, int const zp) VTIterator(TetraType * const tp, int const zp)
{ {