Commit eb300ea8 authored by Sylvain Thery's avatar Sylvain Thery

remove some bugs & warnings

parent 035fdf2f
......@@ -66,7 +66,7 @@ Approximator<PFP,T,ORBIT>::Approximator(MAP& m, std::vector<VertexAttribute<T>*
template <typename PFP, typename T, unsigned int ORBIT>
Approximator<PFP,T,ORBIT>::~Approximator()
{
std::cout << "Approximator<PFP,T,ORBIT>::~Approximator()" << std::endl ;
// std::cout << "Approximator<PFP,T,ORBIT>::~Approximator()" << std::endl ;
for (unsigned int i = 0 ; i < m_attrV.size() ; ++i)
{
this->m_map.template removeAttribute(m_approx[i]) ;
......
......@@ -105,7 +105,10 @@ int decimate(
case A_hQEM :
// pos
approximators.push_back(new Approximator_QEMhalfEdge<PFP>(map, attribs)) ;
break ;
break ;
case A_OTHER:
break;
}
switch(s)
......@@ -155,9 +158,11 @@ int decimate(
case S_GeomColOptGrad:
selector = new EdgeSelector_GeomColOptGradient<PFP>(map, position, approximators) ;
break ;
case S_OTHER:
break;
}
int status = decimate(map, selector, approximators, nbWantedVertices, edgeErrors, callback_wrapper, callback_object) ;
int status = decimate<PFP>(map, selector, approximators, nbWantedVertices, true, edgeErrors, callback_wrapper, callback_object) ;
delete selector ;
......
......@@ -66,11 +66,9 @@ public:
SelectorType getType() { return S_MapOrder ; }
bool init() ;
bool nextEdge(Dart& d) const ;
void updateBeforeCollapse(Dart d)
{}
void updateBeforeCollapse(Dart /*d*/) {}
void updateAfterCollapse(Dart d2, Dart dd2) ;
void updateWithoutCollapse() { }
void updateWithoutCollapse() {}
} ;
......@@ -98,10 +96,8 @@ public:
SelectorType getType() { return S_Random ; }
bool init() ;
bool nextEdge(Dart& d) const ;
void updateBeforeCollapse(Dart d2)
{}
void updateBeforeCollapse(Dart /*d2*/) {}
void updateAfterCollapse(Dart d2, Dart dd2) ;
void updateWithoutCollapse();
} ;
......
......@@ -56,7 +56,7 @@ bool EdgeSelector_MapOrder<PFP>::nextEdge(Dart& d) const
}
template <typename PFP>
void EdgeSelector_MapOrder<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void EdgeSelector_MapOrder<PFP>::updateAfterCollapse(Dart /*d2*/, Dart /*dd2*/)
{
typename PFP::MAP& m = this->m_map ;
cur = m.begin() ;
......@@ -111,7 +111,7 @@ bool EdgeSelector_Random<PFP>::nextEdge(Dart& d) const
}
template <typename PFP>
void EdgeSelector_Random<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void EdgeSelector_Random<PFP>::updateAfterCollapse(Dart /*d2*/, Dart /*dd2*/)
{
typename PFP::MAP& m = this->m_map ;
allSkipped = false ;
......@@ -862,7 +862,7 @@ void EdgeSelector_NormalArea<PFP>::updateBeforeCollapse(Dart d)
}
template <typename PFP>
void EdgeSelector_NormalArea<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void EdgeSelector_NormalArea<PFP>::updateAfterCollapse(Dart d2, Dart /*dd2*/)
{
typename PFP::MAP& m = this->m_map ;
......@@ -1310,7 +1310,7 @@ void EdgeSelector_CurvatureTensor<PFP>::updateBeforeCollapse(Dart d)
}
template <typename PFP>
void EdgeSelector_CurvatureTensor<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void EdgeSelector_CurvatureTensor<PFP>::updateAfterCollapse(Dart d2, Dart /*dd2*/)
{
typename PFP::MAP& m = this->m_map ;
CellMarkerStore<EDGE> eMark (m);
......@@ -2062,7 +2062,7 @@ void EdgeSelector_GeomColOptGradient<PFP>::recomputeQuadric(const Dart d, const
}
template <typename PFP>
void EdgeSelector_GeomColOptGradient<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void EdgeSelector_GeomColOptGradient<PFP>::updateAfterCollapse(Dart d2, Dart /*dd2*/)
{
typename PFP::MAP& m = this->m_map ;
......
......@@ -167,7 +167,7 @@ void HalfEdgeSelector_QEMml<PFP>::recomputeQuadric(const Dart d, const bool reco
}
template <typename PFP>
void HalfEdgeSelector_QEMml<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void HalfEdgeSelector_QEMml<PFP>::updateAfterCollapse(Dart d2, Dart /*dd2*/)
{
MAP& m = this->m_map ;
......@@ -450,7 +450,7 @@ void HalfEdgeSelector_QEMextColor<PFP>::recomputeQuadric(const Dart d, const boo
}
template <typename PFP>
void HalfEdgeSelector_QEMextColor<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void HalfEdgeSelector_QEMextColor<PFP>::updateAfterCollapse(Dart d2, Dart /*dd2*/)
{
MAP& m = this->m_map ;
......@@ -763,7 +763,7 @@ void HalfEdgeSelector_ColorGradient<PFP>::recomputeQuadric(const Dart d)
}
template <typename PFP>
void HalfEdgeSelector_ColorGradient<PFP>::updateAfterCollapse(Dart d2, Dart dd2)
void HalfEdgeSelector_ColorGradient<PFP>::updateAfterCollapse(Dart d2, Dart /*dd2*/)
{
MAP& m = this->m_map ;
......
......@@ -99,7 +99,7 @@ public:
virtual void updateAfterCollapse(Dart d2, Dart dd2) = 0 ;
virtual void updateWithoutCollapse() = 0;
virtual void getEdgeErrors(EdgeAttribute<typename PFP::REAL> *errors) const
virtual void getEdgeErrors(EdgeAttribute<typename PFP::REAL>* /*errors*/) const
{
std::cout << "WARNING:: getEdgeErrors was not overridden" << std::endl ;
}
......
......@@ -533,7 +533,7 @@ void normalCycles_SortAndSetEigenComponents(
typename PFP::VEC3& Kmin,
typename PFP::VEC3& Knormal,
const typename PFP::VEC3& normal,
unsigned int thread)
unsigned int /*thread*/)
{
// sort eigen components : ev[inormal] has minimal absolute value ; kmin = ev[imin] <= ev[imax] = kmax
int inormal=0, imin, imax ;
......@@ -563,7 +563,7 @@ void normalCycles_SortAndSetEigenComponents(
}
template <typename PFP>
void normalCycles_SortTensor(Geom::Matrix<3,3,typename PFP::REAL> & tensor, unsigned int thread)
void normalCycles_SortTensor(Geom::Matrix<3,3,typename PFP::REAL> & tensor, unsigned int /*thread*/)
{
typedef typename PFP::REAL REAL ;
typedef typename PFP::VEC3 VEC3 ;
......
......@@ -116,12 +116,12 @@ public:
template <typename PPFP>
friend std::ostream& operator<<(std::ostream &out, const Collector<PPFP>& c);
virtual REAL computeArea (const VertexAttribute<VEC3>& pos) {
virtual REAL computeArea (const VertexAttribute<VEC3>& /*pos*/) {
assert(!"Warning: Collector<PFP>::computeArea() should be overloaded in non-virtual derived classes");
return 0.0;
}
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3>& pos, const EdgeAttribute<REAL>& edgeangle, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); }
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3>& pos, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); }
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3>& /*pos*/, const EdgeAttribute<REAL>& /*edgeangle*/, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); }
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3>& /*pos*/, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); }
};
......
......@@ -56,7 +56,7 @@ public:
/**
* Taille du bloc
*/
static const unsigned int BlockSize = _BLOCKSIZE_;
// static const unsigned int BlockSize = _BLOCKSIZE_;
protected:
/**
......
......@@ -277,13 +277,13 @@ unsigned int AttributeMultiVector<T>::getBlocksPointers(std::vector<void*>& addr
**************************************/
template <typename T>
void AttributeMultiVector<T>::initElt(unsigned int id)
inline void AttributeMultiVector<T>::initElt(unsigned int id)
{
m_tableData[id / _BLOCKSIZE_][id % _BLOCKSIZE_] = T(0);
}
template <typename T>
void AttributeMultiVector<T>::copyElt(unsigned int dst, unsigned int src)
inline void AttributeMultiVector<T>::copyElt(unsigned int dst, unsigned int src)
{
m_tableData[dst / _BLOCKSIZE_][dst % _BLOCKSIZE_] = m_tableData[src / _BLOCKSIZE_][src % _BLOCKSIZE_];
}
......
......@@ -28,7 +28,8 @@
#include "Utils/gzstream.h"
#include "Utils/cgognStream.h"
#define _BLOCKSIZE_ 4096
//#define _BLOCKSIZE_ 4096
const unsigned int _BLOCKSIZE_ = 4096;
//typedef std::ifstream CGoGNistream;
//typedef std::ofstream CGoGNostream;
......
......@@ -33,7 +33,7 @@ Quadric<REAL>::Quadric()
}
template <typename REAL>
Quadric<REAL>::Quadric(int i)
Quadric<REAL>::Quadric(int)
{
A.zero() ;
}
......@@ -166,7 +166,7 @@ QuadricNd<REAL,N>::QuadricNd()
}
template <typename REAL, unsigned int N>
QuadricNd<REAL,N>::QuadricNd(int i)
QuadricNd<REAL,N>::QuadricNd(int)
{
A.zero() ;
b.zero() ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment