fixed nanoply warnings

This commit is contained in:
Luigi Malomo 2020-11-25 09:59:29 +01:00
parent 9b6f9df6cc
commit 141a27104e
3 changed files with 16 additions and 8 deletions

View File

@ -164,14 +164,14 @@ public:
}
inline const S &X() const { return _v[0]; }
inline const S &Y() const { return _v[1]; }
inline const S &Z() const { static_assert(N>2); return _v[2]; }
inline const S &Z() const { static_assert(N>2, "wrong point dimension"); return _v[2]; }
/// W is in any case the last coordinate.
/// (in a 2D point, W() == Y(). In a 3D point, W()==Z()
/// in a 4D point, W() is a separate component)
inline const S &W() const { return _v[N-1]; }
inline S &X() { return _v[0]; }
inline S &Y() { return _v[1]; }
inline S &Z() { static_assert(N>2); return _v[2]; }
inline S &Z() { static_assert(N>2, "wrong point dimension"); return _v[2]; }
inline S &W() { return _v[N-1]; }
inline const S * V() const
{
@ -359,7 +359,7 @@ public:
(provided for uniformity with other spatial classes. trivial for points)
**/
inline PointType LocalToGlobal(ParamType p) const{
inline PointType LocalToGlobal(ParamType /*p*/) const{
return *this; }
inline ParamType GlobalToLocal(PointType /*p*/) const{
@ -798,7 +798,7 @@ public:
PointType n = Norm(); if(n!=0.0) { n=1.0/n; _v[0]*=n; _v[1]*=n; _v[2]*=n; _v[3]*=n; }
return *this;};
template <class PT> PointType & Normalize(const PT &p){
template <class PT> PointType & Normalize(const PT &/*p*/){
PointType n = Norm(); if(n!=0.0) { n=1.0/n; V(0)*=n; V(1)*=n; V(2)*=n; V(3)*=n; }
return *this;};

View File

@ -2728,12 +2728,16 @@ namespace nanoply
}
template < typename TupleType, size_t ActionType>
inline bool TupleForEach(TupleType &tuple, PlyElement &elem, PlyFile& file, bool fixEndian, SizeT<0> t, SizeT<ActionType> a) { return false; }
inline bool TupleForEach(TupleType &tuple, PlyElement &elem, PlyFile& file, bool fixEndian, SizeT<0> t, SizeT<ActionType> a)
{
(void)tuple; (void)elem; (void)file; (void)fixEndian; (void)t; (void)a;
return false;
}
template < typename TupleType, size_t N, size_t ActionType>
inline bool TupleForEach(TupleType &tuple, PlyElement &elem, PlyFile& file, bool fixEndian, SizeT<N> t, SizeT<ActionType> a)
{
(void)t;
(void)t;
typename std::tuple_element<N - 1, TupleType>::type &elemDescr = std::get<N - 1>(tuple);
if ((elemDescr.elem != PlyElemEntity::NNP_UNKNOWN_ELEM && elemDescr.elem == elem.plyElem) ||
(elemDescr.elem == PlyElemEntity::NNP_UNKNOWN_ELEM && elemDescr.name == elem.name))

View File

@ -553,7 +553,7 @@ namespace nanoply
else
tempProp[i] = p;
}
unsigned int r = (bitType & (~tempProp[0].type));
unsigned int r = (bitType & (~tempProp[0].type)); (void)r;
if (tempProp.size() > 1 && ((bitType & (~tempProp[0].type)) == 0))
{
if (tempProp.size() == 2)
@ -670,6 +670,7 @@ namespace nanoply
template <bool f = std::is_same<typename T::VertContainer, vcg::vertex::vector_ocf<VType>>::value>
static unsigned int EnableVertexOcf(typename T::VertContainer& cont, unsigned int mask) {
(void)cont; (void)mask;
return 0;
}
@ -718,6 +719,7 @@ namespace nanoply
template <bool f = std::is_same<typename T::FaceContainer, vcg::face::vector_ocf<FType>>::value>
static unsigned int EnableFaceOcf(typename T::FaceContainer& cont, unsigned int mask) {
(void)cont; (void)mask;
return 0;
}
@ -773,6 +775,7 @@ namespace nanoply
template <bool f = std::is_same<typename T::VertContainer, vcg::vertex::vector_ocf<VType>>::value>
static unsigned int VertexOcfMask(typename T::VertContainer& cont) {
(void)cont;
return 0;
}
@ -800,6 +803,7 @@ namespace nanoply
template <bool f = std::is_same<typename T::FaceContainer, vcg::face::vector_ocf<FType>>::value>
static unsigned int FaceOcfMask(typename T::FaceContainer& cont) {
(void)cont;
return 0;
}
@ -1590,7 +1594,7 @@ namespace nanoply
if (!userDescr)
custom.CreateFaceAttribDescriptor(&(*ai));
}
for (int i = 0; i < custom.faceAttrib.size(); i++)
for (size_t i = 0; i < custom.faceAttrib.size(); i++)
{
faceProp.push_back(custom.faceAttribProp[i]);
faceDescr.dataDescriptor.push_back(custom.faceAttrib[i]);