Commit 82d4fd2e authored by Sylvain Thery's avatar Sylvain Thery

add -Wextra compilation flag & remove some warnings

parent 20543b8f
......@@ -965,7 +965,7 @@ void Clipping::cb_keyPress(int code)
}
}
void Clipping::cb_mousePress(int button, int x, int y)
void Clipping::cb_mousePress(int /*button*/, int x, int y)
{
// Check if no animation is active
if (m_lastAnimatedClippingPreset != NULL)
......
......@@ -145,7 +145,7 @@ void MyQT::cb_redraw()
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (!Shift())
return;
......@@ -249,7 +249,7 @@ void MyQT::cb_mouseMove(int buttons, int x, int y)
}
void MyQT::cb_wheelEvent(int delta, int x, int y)
void MyQT::cb_wheelEvent(int delta, int /*x*/, int /*y*/)
{
if (!Shift())
return;
......
......@@ -33,24 +33,26 @@
#include "Utils/chrono.h"
#include "Algo/Export/exportVol.h"
PFP::MAP myMap;
VertexAttribute<PFP::VEC3> position ;
VolumeAttribute<PFP::VEC3> color ;
void MyQT::volumes_onoff(bool x)
void MyQT::volumes_onoff(bool /*x*/)
{
render_volumes = !render_volumes;
updateGL();
}
void MyQT::edges_onoff(bool x)
void MyQT::edges_onoff(bool /*x*/)
{
render_edges = !render_edges;
updateGL();
}
void MyQT::topo_onoff(bool x)
void MyQT::topo_onoff(bool /*x*/)
{
render_topo = !render_topo;
if (render_topo)
......@@ -88,7 +90,7 @@ void MyQT::clipping_onoff(bool x)
updateGL();
}
void MyQT::hide_onoff(bool x)
void MyQT::hide_onoff(bool /*x*/)
{
hide_clipping = !hide_clipping;
updateGL();
......@@ -270,7 +272,7 @@ void MyQT::cb_redraw()
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (!Shift())
return;
......@@ -299,7 +301,7 @@ void MyQT::cb_mousePress(int button, int x, int y)
}
}
void MyQT::cb_mouseRelease(int button, int x, int y)
void MyQT::cb_mouseRelease(int /*button*/, int /*x*/, int /*y*/)
{
if (hide_clipping || !clip_volume)
......@@ -418,6 +420,12 @@ int main(int argc, char **argv)
color[i][0] /= maxV;
color[i][2] = 1.0f - color[i][0];
}
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test2.nas");
// Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh");
// Algo::Volume::Export::exportTet<PFP>(myMap,position,"/tmp/test2.tet");
// Algo::Volume::Export::exportNodeEle<PFP>(myMap,position,"/tmp/test2");
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test4.vtu");
}
else
{
......@@ -437,6 +445,9 @@ int main(int argc, char **argv)
TraversorW<PFP::MAP> tra(myMap);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
color[d] = position[d] + PFP::VEC3(0.5,0.5,0.5);
// Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh");
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test1.nas");
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test3.vtu");
}
// un peu d'interface
QApplication app(argc, argv);
......
......@@ -140,7 +140,7 @@ void MyQT::cb_redraw()
m_drawer.callList();
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (Shift())
{
......
......@@ -38,21 +38,21 @@ MAP myMap;
VertexAttribute<VEC3> position ;
Dart dglobal;
void MyQT::balls_onoff(bool x)
void MyQT::balls_onoff(bool /*x*/)
{
render_balls = !render_balls;
updateGL();
CGoGNerr << " balls_onoff "<< CGoGNendl;
}
void MyQT::vectors_onoff(bool x)
void MyQT::vectors_onoff(bool /*x*/)
{
render_vectors = !render_vectors;
updateGL();
CGoGNerr << " vectors_onoff "<< CGoGNflush;
}
void MyQT::text_onoff(bool x)
void MyQT::text_onoff(bool /*x*/)
{
render_text = !render_text;
updateGL();
......@@ -60,7 +60,7 @@ void MyQT::text_onoff(bool x)
}
void MyQT::topo_onoff(bool x)
void MyQT::topo_onoff(bool /*x*/)
{
render_topo = !render_topo;
updateGL();
......@@ -211,7 +211,7 @@ void MyQT::cb_redraw()
}
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (Shift())
{
......
......@@ -146,7 +146,7 @@ public:
FunctorAttribThreaded(),m_positions(pos),m_positions2(pos2)
{}
void run(unsigned int i, unsigned int threadID)
void run(unsigned int i, unsigned int /*threadID*/)
{
m_positions2[i] = 1.1f * m_positions[i];
}
......@@ -181,7 +181,7 @@ public:
m_positions(pos),m_positions2(pos2)
{}
void run(Dart d, unsigned int threadID)
void run(Dart d, unsigned int /*threadID*/)
{
typename XXX::VEC3 Q(0,0,0);
int nb=0;
......@@ -232,7 +232,7 @@ public:
unsigned int getNb() { return m_nb;}
void run(Dart d, unsigned int threadID)
void run(Dart d, unsigned int /*threadID*/)
{
Dart dd = this->m_map.phi2(d);
typename XXX::VEC3 V = m_positions[dd] - m_positions[d];
......
......@@ -88,7 +88,7 @@ void MyQT::clipping_onoff(bool x)
updateGL();
}
void MyQT::hide_onoff(bool x)
void MyQT::hide_onoff(bool /*x*/)
{
hide_clipping = !hide_clipping;
updateMap();
......@@ -253,7 +253,7 @@ void MyQT::operation(int x)
dock.listOper->setCurrentRow(-1);
}
void MyQT::createMap(int n)
void MyQT::createMap(int /*n*/)
{
myMap.clear(true);
position = myMap.getAttribute<VEC3, VERTEX>("position");
......@@ -440,7 +440,7 @@ void MyQT::cb_mousePress(int button, int x, int y)
}
}
void MyQT::cb_mouseRelease(int button, int x, int y)
void MyQT::cb_mouseRelease(int /*button*/, int /*x*/, int /*y*/)
{
if (hide_clipping || !clip_volume)
......
......@@ -42,7 +42,7 @@ VertexAttribute<VEC3> position ;
DartAttribute<VEC3> middleDarts;
void MyQT::text_onoff(bool x)
void MyQT::text_onoff(bool /*x*/)
{
render_text = !render_text;
updateGL();
......@@ -162,7 +162,7 @@ void MyQT::cb_redraw()
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (Shift())
{
......
......@@ -138,8 +138,9 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
# set(CMAKE_CONFIGURATION_TYPES "Release Debug" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC")
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wsign-compare -Wtype-limits -Wuninitialized -fPIC")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Woverride-init -fPIC")
add_subdirectory(Release)
add_subdirectory(Debug)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
......
......@@ -105,7 +105,7 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES Release Debug)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ")
ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
......
......@@ -174,7 +174,7 @@ inline void ImplicitHierarchicalMap::next(Dart& d) const
} while(d != Map2::end() && m_dartLevel[d] > m_curLevel) ;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart dNext = d;
do
......@@ -186,7 +186,7 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType&
return false;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int /*thread*/)
{
if (f(d))
return true;
......@@ -198,7 +198,7 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_edge(Dart d, FunctorType& f
return false;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart dNext = d ;
do
......@@ -212,12 +212,12 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_face(Dart d, Funct
inline bool ImplicitHierarchicalMap::foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_face(d, f) ;
return foreach_dart_of_oriented_face(d, f,thread) ;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread)
{
DartMarkerStore mark(*this); // Lock a marker
DartMarkerStore mark(*this,thread); // Lock a marker
bool found = false; // Last functor return value
std::list<Dart> visitedFaces; // Faces that are traversed
......@@ -253,12 +253,12 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_volume(Dart d, Fun
inline bool ImplicitHierarchicalMap::foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_volume(d, f) ;
return foreach_dart_of_oriented_volume(d, f, thread) ;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_volume(d, f) ;
return foreach_dart_of_oriented_volume(d, f, thread) ;
}
/***************************************************
......
......@@ -269,7 +269,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType&
return false;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart dNext = d ;
do
......@@ -401,7 +401,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f,
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart dNext = d;
do
......@@ -413,7 +413,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorTyp
return false;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int /*thread*/)
{
if (f(d))
return true;
......
......@@ -514,7 +514,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesVolume<PFP>& mtv)
template <typename PFP>
bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices)
bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool /*mergeCloseVertices*/)
{
ImportType kind = Volume::Import::UNKNOWNVOLUME;
......
......@@ -97,7 +97,7 @@ bool importVTU(typename PFP::MAP& map, const std::string& filename, std::vector<
{
typename PFP::VEC3 P;
ss >> P[0]; ss >> P[1]; ss >> P[2];
// std::cout << P << std::endl;
P *= scaleFactor;
unsigned int id = container.insertLine();
position[id] = P;
verticesID.push_back(id);
......@@ -110,10 +110,6 @@ bool importVTU(typename PFP::MAP& map, const std::string& filename, std::vector<
std::cout <<"CELL NODE = "<< cell_node->name << std::endl;
// cell_node = cell_node->children;
// while (strcmp((char*)(cell_node->name),(char*)"DataArray")!=0)
// cell_node = cell_node->next;
std::vector<unsigned char> typeVols;
typeVols.reserve(nbVolumes);
......@@ -123,25 +119,6 @@ bool importVTU(typename PFP::MAP& map, const std::string& filename, std::vector<
indices.reserve(nbVolumes*4);
// cell_node = cell_node->children;
// while (strcmp((char*)(cell_node->name),(char*)"DataArray")!=0)
// cell_node = cell_node->next;
// std::cout <<"1NODE = "<< (char*)(cell_node->name) << std::endl;
// xmlChar* type = xmlGetProp(cell_node, BAD_CAST "Name");
// std::cout <<"1NAME = "<< (char*)(type) << std::endl;
// while (strcmp((char*)(cell_node->name),(char*)"DataArray")!=0)
// cell_node = cell_node->next;
// std::cout <<"2NODE = "<< (char*)(cell_node->name) << std::endl;
// type = xmlGetProp(cell_node, BAD_CAST "Name");
// std::cout <<"2NAME = "<< (char*)(type) << std::endl;
// while (strcmp((char*)(cell_node->name),(char*)"DataArray")!=0)
// cell_node = cell_node->next;
// std::cout <<"3NODE = "<< (char*)(cell_node->name) << std::endl;
// type = xmlGetProp(cell_node, BAD_CAST "Name");
// std::cout <<"3NAME = "<< (char*)(type) << std::endl;
for (xmlNode* x_node = cell_node->children; x_node!=NULL; x_node = x_node->next)
{
while ((x_node!=NULL) && (strcmp((char*)(x_node->name),(char*)"DataArray")!=0))
......@@ -152,12 +129,9 @@ bool importVTU(typename PFP::MAP& map, const std::string& filename, std::vector<
else
{
xmlChar* type = xmlGetProp(x_node, BAD_CAST "Name");
// std::cout <<"NODE = "<< (char*)(x_node->name) << std::endl;
// std::cout <<"NAME = "<< (char*)(type) << std::endl;
if (strcmp((char*)(type),(char*)"connectivity")==0)
{
// c_indices =(char*)(xmlNodeGetContent(x_node->children));
std::stringstream ss((char*)(xmlNodeGetContent(x_node->children)));
while (!ss.eof())
{
......
......@@ -955,7 +955,7 @@ void MarchingCube<DataType, Windowing, PFP>::setNeighbour(L_DART d1, L_DART d2)
}
template< typename DataType, template < typename D2 > class Windowing, typename PFP >
void MarchingCube<DataType, Windowing, PFP>::createLocalFaces(const unsigned char _ucCubeIndex, const int _lX, const int _lY, const int _lZ, unsigned int const *_lVertTable, const unsigned short _usMask, float curv, unsigned char tag)
void MarchingCube<DataType, Windowing, PFP>::createLocalFaces(const unsigned char _ucCubeIndex, const int _lX, const int _lY, const int /*_lZ*/, unsigned int const *_lVertTable, const unsigned short _usMask, float /*curv*/, unsigned char /*tag*/)
{
// TODO parametre _LZ not used => a supprimer ?
// TODO parametre curv not used => a supprimer ?
......
......@@ -78,7 +78,7 @@ void drawerAddVolume(Utils::Drawer& dr, typename PFP::MAP& map, Dart d, const Ve
}
template<typename PFP>
void drawerVertices(Utils::Drawer& dr, typename PFP::MAP& map, std::vector<Dart>& vd, const VertexAttribute<typename PFP::VEC3>& positions)
void drawerVertices(Utils::Drawer& dr, typename PFP::MAP& /*map*/, std::vector<Dart>& vd, const VertexAttribute<typename PFP::VEC3>& positions)
{
dr.begin(GL_POINTS);
for (std::vector<Dart>::iterator it = vd.begin(); it !=vd.end(); ++it)
......@@ -113,7 +113,7 @@ void drawerVolumes(Utils::Drawer& dr, typename PFP::MAP& map, std::vector<Dart>&
}
template<typename PFP>
void drawerVertex(Utils::Drawer& dr, typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& positions)
void drawerVertex(Utils::Drawer& dr, typename PFP::MAP& /*map*/, Dart d, const VertexAttribute<typename PFP::VEC3>& positions)
{
dr.begin(GL_POINTS);
dr.vertex(positions[d]);
......
......@@ -93,7 +93,7 @@ inline ExplodeVolumeRender::~ExplodeVolumeRender()
template<typename PFP>
void ExplodeVolumeRender::computeFace(typename PFP::MAP& map, Dart d, const VertexAttribute<typename PFP::VEC3>& positions,
const typename PFP::VEC3& centerFace, const typename PFP::VEC3& centerNormalFace,
const typename PFP::VEC3& centerFace, const typename PFP::VEC3& /*centerNormalFace*/,
std::vector<typename PFP::VEC3>& vertices, std::vector<typename PFP::VEC3>& normals)
{
typedef typename PFP::VEC3 VEC3;
......
......@@ -35,7 +35,7 @@ namespace SVG
{
template <typename PFP>
void renderVertices(Utils::SVG::SVGOut& svg, typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, unsigned int thread)
void renderVertices(Utils::SVG::SVGOut& svg, typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, unsigned int /*thread*/)
{
Utils::SVG::SvgGroup* svg1 = new Utils::SVG::SvgGroup("vertices", svg.m_model, svg.m_proj);
TraversorV<typename PFP::MAP> trac(map);
......@@ -59,7 +59,7 @@ void renderVertices(Utils::SVG::SVGOut& svg, typename PFP::MAP& map, const Verte
}
template <typename PFP>
void renderEdges(Utils::SVG::SVGOut& svg, typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, unsigned int thread)
void renderEdges(Utils::SVG::SVGOut& svg, typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, unsigned int /*thread*/)
{
Utils::SVG::SvgGroup* svg1 = new Utils::SVG::SvgGroup("edges", svg.m_model, svg.m_proj);
TraversorE<typename PFP::MAP> trac(map);
......
......@@ -55,7 +55,7 @@ public:
};
template <typename T>
NoMathAttribute<T> operator*(T a, const NoMathAttribute<T>& v)
NoMathAttribute<T> operator*(T /*a*/, const NoMathAttribute<T>& /*v*/)
{
return T();
}
......@@ -71,15 +71,15 @@ class NoMathNameAttribute : public T
{
public:
NoMathNameAttribute() : T() {}
NoMathNameAttribute(int i) : T() {}
NoMathNameAttribute(int /*i*/) : T() {}
NoMathNameAttribute(const T& att): T(att) {}
NoMathNameAttribute<T>& operator = (const T& fa) { return *this = NoMathNameAttribute<T>(fa); }
void operator += (const NoMathNameAttribute<T>& fa) {}
void operator -= (const NoMathNameAttribute<T>& fa) {}
void operator *= (double v) {}
void operator /= (double v) {}
void operator += (const NoMathNameAttribute<T>& /*fa*/) {}
void operator -= (const NoMathNameAttribute<T>& /*fa*/) {}
void operator *= (double /*v*/) {}
void operator /= (double /*v*/) {}
T operator *(double v) const {return T();}
static std::string CGoGNnameOfType() { return ""; }
......@@ -95,7 +95,7 @@ class NoNameAttribute : public T
{
public:
NoNameAttribute() : T() {}
NoNameAttribute(int i) : T() {}
NoNameAttribute(int /*i*/) : T() {}
NoNameAttribute(const T& att) : T(att) {}
NoNameAttribute<T>& operator = (const T& fa) { return *this = NoNameAttribute<T>(fa); }
......@@ -113,13 +113,13 @@ class NoIOAttribute : public T
{
public:
NoIOAttribute() : T() {}
NoIOAttribute(int i) : T() {}
NoIOAttribute(int /*i*/) : T() {}
NoIOAttribute(const T& att) : T(att) {}
NoIOAttribute<T>& operator = (const T& fa) { return *this = NoIOAttribute<T>(fa); }
friend std::ostream& operator<<( std::ostream &out, const NoIOAttribute<T>& fa ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoIOAttribute<T>& fa ) { return in ; }
friend std::ostream& operator<<( std::ostream &out, const NoIOAttribute<T>& /*fa*/ ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoIOAttribute<T>& /*fa*/ ) { return in ; }
static std::string CGoGNnameOfType() { return nameOfType(T()); }
};
......@@ -134,13 +134,13 @@ class NoNameIOAttribute : public T
{
public:
NoNameIOAttribute() : T() {}
NoNameIOAttribute(int i) : T() {}
NoNameIOAttribute(int /*i*/) : T() {}
NoNameIOAttribute(const T& att) : T(att) {}
NoNameIOAttribute<T>& operator = (const T& fa) { return *this = NoNameIOAttribute<T>(fa); }
friend std::ostream& operator<<( std::ostream &out, const NoNameIOAttribute<T>& fa ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoNameIOAttribute<T>& fa ) { return in ; }
friend std::ostream& operator<<( std::ostream &out, const NoNameIOAttribute<T>& /*fa*/ ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoNameIOAttribute<T>& /*fa*/ ) { return in ; }
static std::string CGoGNnameOfType() { return ""; }
};
......@@ -155,18 +155,18 @@ class NoMathIOAttribute : public T
{
public:
NoMathIOAttribute() : T() {}
NoMathIOAttribute(int i) : T() {}
NoMathIOAttribute(int /*i*/) : T() {}
NoMathIOAttribute(const T& att): T(att) {}
NoMathIOAttribute<T>& operator = (const T& fa) { return *this = NoMathIOAttribute<T>(fa); }
friend std::ostream& operator<<( std::ostream &out, const NoMathIOAttribute<T>& fa ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoMathIOAttribute<T>& fa ) { return in ; }
friend std::ostream& operator<<( std::ostream &out, const NoMathIOAttribute<T>& /*fa*/ ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoMathIOAttribute<T>& /*fa*/ ) { return in ; }
void operator += (const NoMathIOAttribute<T>& fa) {}
void operator -= (const NoMathIOAttribute<T>& fa) {}
void operator *= (double v) {}
void operator /= (double v) {}
void operator += (const NoMathIOAttribute<T>& /*fa*/) {}
void operator -= (const NoMathIOAttribute<T>& /*fa*/) {}
void operator *= (double /*v*/) {}
void operator /= (double /*v*/) {}
static std::string CGoGNnameOfType() { return nameOfType(T());}
};
......@@ -182,18 +182,18 @@ class NoMathIONameAttribute: public T
{
public:
NoMathIONameAttribute() : T() {}
NoMathIONameAttribute(int i) : T() {}
NoMathIONameAttribute(int /*i*/) : T() {}
NoMathIONameAttribute(const T& att) : T(att) {}
NoMathIONameAttribute<T>& operator = (const T& fa) { return *this = NoMathIONameAttribute<T>(fa); }
friend std::ostream& operator<<( std::ostream &out, const NoMathIONameAttribute<T>& fa ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoMathIONameAttribute<T>& fa ) { return in ; }
friend std::ostream& operator<<( std::ostream &out, const NoMathIONameAttribute<T>& /*fa*/ ) { return out ; }
friend const std::istream& operator>>( const std::istream &in, NoMathIONameAttribute<T>& /*fa*/ ) { return in ; }
void operator += (const NoMathIONameAttribute<T>& fa) {}
void operator -= (const NoMathIONameAttribute<T>& fa) {}
void operator *= (double v) {}
void operator /= (double v) {}
void operator += (const NoMathIONameAttribute<T>& /*fa*/) {}
void operator -= (const NoMathIONameAttribute<T>& /*fa*/) {}
void operator *= (double /*v*/) {}
void operator /= (double /*v*/) {}
static std::string CGoGNnameOfType() { return ""; }
};
......
......@@ -96,10 +96,10 @@ struct Dart
friend std::ostream& operator<<( std::ostream &out, const Dart& fa ) { return out << fa.index; }
friend std::istream& operator>>( std::istream &in, Dart& fa ) { in >> fa.index; return in; }
void operator += (const Dart& fa) {}
void operator -= (const Dart& fa) {}
void operator *= (double v) {}
void operator /= (double v) {}
void operator += (const Dart& /*fa*/) {}
void operator -= (const Dart& /*fa*/) {}
void operator *= (double /*v*/) {}
void operator /= (double /*v*/) {}
/**
* CGoGN name
......
......@@ -702,16 +702,16 @@ public:
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) = 0 ;
virtual bool foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread = 0) = 0 ;
virtual bool foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_face(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_volume(Dart /*d*/, FunctorType& /*f*/, unsigned /*int thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_cc(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_vertex1(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_edge1(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_vertex1(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_edge1(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread = 0) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_vertex2(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_edge2(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
virtual bool foreach_dart_of_face2(Dart /*d*/, FunctorType& /*f*/, unsigned int /*thread = 0*/) { std::cerr << "Not implemented" << std::endl; return false; }
/**
* execute functor for each orbit
......
......@@ -109,7 +109,7 @@ Traversor3XY<MAP, ORBX, ORBY>::Traversor3XY(MAP& map, Dart dart, bool forceDartM
}
template <typename MAP, unsigned int ORBX, unsigned int ORBY>
Traversor3XY<MAP, ORBX, ORBY>::Traversor3XY(MAP& map, Dart dart, MarkerForTraversor<MAP, ORBY>& tmo, bool forceDartMarker, unsigned int thread) :
Traversor3XY<MAP, ORBX, ORBY>::Traversor3XY(MAP& map, Dart dart, MarkerForTraversor<MAP, ORBY>& tmo, bool /*forceDartMarker*/, unsigned int thread) :
m_map(map),
m_tradoo(map, dart, thread),
m_allocated(false),
......
......@@ -95,12 +95,12 @@ inline void GMap0::beta0unsew(Dart d)
* Apply functors to all darts of a cell
*************************************************************************/
inline bool GMap0::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
inline bool GMap0::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int /*thread*/)
{
return f(d) ;
}
inline bool GMap0::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread)
inline bool GMap0::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int /*thread*/)
{
if (f(d)) return true;
Dart d1 = beta0(d);
......
......@@ -295,7 +295,7 @@ inline bool GMap1::isCycleTriangle(Dart d)
* Apply functors to all darts of a cell
*************************************************************************/
inline bool GMap1::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
inline bool GMap1::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int /*thread*/)
{
if (f(d)) return true;
Dart d1 = beta1(d);
......@@ -303,7 +303,7 @@ inline bool GMap1::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int t
return false;
}
inline bool GMap1::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread)
inline bool GMap1::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int /*thread*/)
{
if (f(d)) return true;
Dart d1 = beta0(d);
......@@ -311,7 +311,7 @@ inline bool GMap1::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thr
return false;
}
inline bool GMap1::foreach_dart_of_oriented_cc(Dart d, FunctorType& f, unsigned int thread)
inline bool GMap1::foreach_dart_of_oriented_cc(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart it = d ;
do
......
......@@ -183,7 +183,7 @@ public:
<