removed some useless consts
This commit is contained in:
parent
87d8294391
commit
e888ef1560
|
@ -244,7 +244,7 @@ class TriMesh: public TriMeshEdgeHolder<VertContainerType,FaceContainerType,Edge
|
|||
int n_attr;
|
||||
void Resize(const int & sz){((SimpleTempDataBase<VertContainer>*)_handle)->Resize(sz);}
|
||||
void Reorder(std::vector<size_t> & newVertIndex){((SimpleTempDataBase<VertContainer>*)_handle)->Reorder(newVertIndex);}
|
||||
const bool operator<(const HandlesWrapper b) const { return(_name.empty()&&b._name.empty())?(_handle < b._handle):( _name < b._name);}
|
||||
bool operator<(const HandlesWrapper b) const { return(_name.empty()&&b._name.empty())?(_handle < b._handle):( _name < b._name);}
|
||||
};
|
||||
|
||||
std::set< HandlesWrapper > vert_attr;
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
void clear(){ datasize = 0;}
|
||||
|
||||
const unsigned int size() const { return datasize;}
|
||||
unsigned int size() const { return datasize;}
|
||||
|
||||
bool & operator [](const int & i){return data[i];}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
};
|
||||
|
||||
inline int & UberFlags () { return this->Flags(); }
|
||||
inline const int UberFlags() const { return this->Flags(); }
|
||||
inline int UberFlags() const { return this->Flags(); }
|
||||
|
||||
bool IsD() const {return (this->Flags() & DELETED) != 0;} /// checks if the vertex is deleted
|
||||
bool IsR() const {return (this->Flags() & NOTREAD) == 0;} /// checks if the vertex is readable
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
// typedef typename T::CoordType CoordType;
|
||||
inline typename T::VertexType * & V( const int j ) { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * const & V( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * const cV( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * cV( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::CoordType & P( const int j ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline const typename T::CoordType & P( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline const typename T::CoordType &cP( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
|
||||
inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<2); return v[j]; }
|
||||
inline typename T::VertexType * const & V( const int j ) const { assert(j>=0 && j<2); return v[j]; }
|
||||
inline typename T::VertexType * const cV( const int j ) const { assert(j>=0 && j<2); return v[j]; }
|
||||
inline typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<2); return v[j]; }
|
||||
|
||||
// Shortcut per accedere ai punti delle facce
|
||||
inline typename T::CoordType & P( const int j ) { assert(j>=0 && j<2); return v[j]->P(); }
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
typedef int FlagType;
|
||||
/// Return the vector of Flags(), senza effettuare controlli sui bit
|
||||
int &Flags() { static int dummyflags(0); assert(0); return dummyflags; }
|
||||
const int Flags() const { return 0; }
|
||||
int Flags() const { return 0; }
|
||||
template < class LeftV>
|
||||
void ImportLocal(const LeftV & left ) { T::ImportLocal( left); }
|
||||
static bool HasFlags() { return false; }
|
||||
|
@ -151,7 +151,7 @@ public:
|
|||
BitFlags(){_flags=0;}
|
||||
typedef int FlagType;
|
||||
int &Flags() {return _flags; }
|
||||
const int Flags() const {return _flags; }
|
||||
int Flags() const {return _flags; }
|
||||
template < class LeftV>
|
||||
void ImportLocal(const LeftV & left ) { Flags() = left.Flags(); T::ImportLocal( left); }
|
||||
static bool HasFlags() { return true; }
|
||||
|
|
|
@ -108,9 +108,9 @@ class FaceTypeHolder{
|
|||
|
||||
|
||||
// prot
|
||||
const int VN() const { return 3;}
|
||||
inline const int Prev(const int & i) const { return (i+(3-1))%3;}
|
||||
inline const int Next(const int & i) const { return (i+1)%3;}
|
||||
int VN() const { return 3;}
|
||||
inline int Prev(const int & i) const { return (i+(3-1))%3;}
|
||||
inline int Next(const int & i) const { return (i+1)%3;}
|
||||
inline void Alloc(const int & ){}
|
||||
inline void Dealloc(){}
|
||||
};
|
||||
|
@ -167,7 +167,7 @@ public:
|
|||
{
|
||||
return this->Flags();
|
||||
}
|
||||
inline const int UberFlags() const
|
||||
inline int UberFlags() const
|
||||
{
|
||||
return this->Flags();
|
||||
}
|
||||
|
|
|
@ -117,8 +117,8 @@ public:
|
|||
// typedef typename T::CoordType CoordType;
|
||||
inline typename T::VertexType * & V( const int j ) { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * const & V( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * const cV( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::CoordType & P( const int j ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline typename T::VertexType * cV( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::CoordType & P( const int j ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline const typename T::CoordType & P( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline const typename T::CoordType &cP( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
template <class LeftF>
|
||||
|
@ -139,7 +139,7 @@ public:
|
|||
|
||||
inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<3); return v[j]; }
|
||||
inline typename T::VertexType * const & V( const int j ) const { assert(j>=0 && j<3); return v[j]; }
|
||||
inline typename T::VertexType * const cV( const int j ) const { assert(j>=0 && j<3); return v[j]; }
|
||||
inline typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<3); return v[j]; }
|
||||
|
||||
// Shortcut per accedere ai punti delle facce
|
||||
inline typename T::CoordType & P( const int j ) { assert(j>=0 && j<3); return v[j]->P(); }
|
||||
|
@ -328,7 +328,7 @@ template <class T> class EmptyBitFlags: public T {
|
|||
public:
|
||||
/// Return the vector of Flags(), senza effettuare controlli sui bit
|
||||
int &Flags() { static int dummyflags(0); assert(0); return dummyflags; }
|
||||
const int Flags() const { return 0; }
|
||||
int Flags() const { return 0; }
|
||||
template <class LeftF>
|
||||
void ImportLocal(const LeftF & leftF){ T::ImportLocal(leftF);}
|
||||
inline void Alloc(const int & ns){T::Alloc(ns);}
|
||||
|
@ -343,7 +343,7 @@ template <class T> class BitFlags: public T {
|
|||
public:
|
||||
BitFlags(){_flags=0;}
|
||||
int &Flags() {return _flags; }
|
||||
const int Flags() const {return _flags; }
|
||||
int Flags() const {return _flags; }
|
||||
const int & cFlags() const {return _flags; }
|
||||
template <class LeftF>
|
||||
void ImportLocal(const LeftF & leftF){ Flags() = leftF.cFlags();T::ImportLocal(leftF);}
|
||||
|
@ -364,7 +364,7 @@ public:
|
|||
typedef int MarkType;
|
||||
inline void InitIMark() { }
|
||||
inline int & IMark() { assert(0); static int tmp=-1; return tmp;}
|
||||
inline const int IMark() const {return 0;}
|
||||
inline int IMark() const {return 0;}
|
||||
|
||||
typedef float QualityType;
|
||||
typedef vcg::Color4b ColorType;
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
// typedef typename T::CoordType CoordType;
|
||||
inline typename T::VertexType * & V( const int j ) { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * const & V( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * const cV( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::VertexType * cV( const int j ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||
inline typename T::CoordType & P( const int j ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline const typename T::CoordType & P( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
inline const typename T::CoordType &cP( const int j ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
PFVAdj(){_vpoly = NULL;}
|
||||
inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<this->VN()); return _vpoly[j]; }
|
||||
inline typename T::VertexType * const & V( const int j ) const { assert(j>=0 && j<this->VN()); return _vpoly[j]; }
|
||||
inline typename T::VertexType * const cV( const int j ) const { assert(j>=0 && j<this->VN()); return _vpoly[j]; }
|
||||
inline typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<this->VN()); return _vpoly[j]; }
|
||||
|
||||
|
||||
/** Return the pointer to the ((j+1)%3)-th vertex of the face.
|
||||
|
|
|
@ -162,7 +162,7 @@ public:
|
|||
};
|
||||
|
||||
inline int & UberFlags () { return this->Flags(); }
|
||||
inline const int UberFlags() const { return this->Flags(); }
|
||||
inline int UberFlags() const { return this->Flags(); }
|
||||
|
||||
bool IsD() const {return (this->Flags() & DELETED) != 0;} /// checks if the vertex is deleted
|
||||
bool IsR() const {return (this->Flags() & NOTREAD) == 0;} /// checks if the vertex is readable
|
||||
|
|
|
@ -265,7 +265,7 @@ public:
|
|||
typedef int FlagType;
|
||||
/// Return the vector of Flags(), senza effettuare controlli sui bit
|
||||
int &Flags() { static int dummyflags(0); assert(0); return dummyflags; }
|
||||
const int Flags() const { return 0; }
|
||||
int Flags() const { return 0; }
|
||||
template < class LeftV>
|
||||
void ImportLocal(const LeftV & left ) { T::ImportLocal( left); }
|
||||
static bool HasFlags() { return false; }
|
||||
|
@ -278,7 +278,7 @@ public:
|
|||
BitFlags(){_flags=0;}
|
||||
typedef int FlagType;
|
||||
int &Flags() {return _flags; }
|
||||
const int Flags() const {return _flags; }
|
||||
int Flags() const {return _flags; }
|
||||
template < class LeftV>
|
||||
void ImportLocal(const LeftV & left ) { if(LeftV::HasFlags()) Flags() = left.Flags(); T::ImportLocal( left); }
|
||||
static bool HasFlags() { return true; }
|
||||
|
@ -294,8 +294,8 @@ template <class T> class EmptyColorMarkQuality: public T {
|
|||
public:
|
||||
typedef float QualityType;
|
||||
QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
|
||||
const QualityType &cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; } const
|
||||
static bool HasQuality() { return false; }
|
||||
const QualityType &cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
|
||||
static bool HasQuality() { return false; }
|
||||
|
||||
typedef vcg::Color4b ColorType;
|
||||
ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
|
||||
|
|
|
@ -68,10 +68,10 @@ public:
|
|||
inline const T & V(const int i) const { assert(i>0 && i<NMAX); return _t[i][1]; }
|
||||
|
||||
inline short & N() { return _n[0]; }
|
||||
inline const short N() const { return _n[0]; }
|
||||
inline short N() const { return _n[0]; }
|
||||
|
||||
inline short & N(const int i) { assert(i>0 && i<NMAX); return _n[i]; }
|
||||
inline const short N(const int i) const { assert(i>0 && i<NMAX); return _n[i]; }
|
||||
inline short N(const int i) const { assert(i>0 && i<NMAX); return _n[i]; }
|
||||
|
||||
|
||||
/* <OLD_METHODS> (lowercase ones). DEPRECATED. TO BE REMOVED SOON.*/
|
||||
|
@ -85,10 +85,10 @@ public:
|
|||
/**/inline const T & v(const int i) const { return _t[i][1]; }
|
||||
/**/
|
||||
/**/inline short & n() { return _n[0]; }
|
||||
/**/inline const short n() const { return _n[0]; }
|
||||
/**/inline short n() const { return _n[0]; }
|
||||
/**/
|
||||
/**/inline short & n(const int i) { return _n[i]; }
|
||||
/**/inline const short n(const int i) const { return _n[i]; }
|
||||
/**/inline short n(const int i) const { return _n[i]; }
|
||||
/**/
|
||||
/**/inline Point2<T> & t(const int i) { return _t[i]; }
|
||||
/**/inline Point2<T> t(const int i) const { return _t[i]; }
|
||||
|
|
Loading…
Reference in New Issue