warning cleanup

This commit is contained in:
Marco Callieri 2018-03-21 12:01:01 +01:00
parent 7939a54f1c
commit ba91309937
7 changed files with 13 additions and 12 deletions

View File

@ -585,7 +585,7 @@ public:
firstVp++;
}
return ToSplitVec.size();
return int(ToSplitVec.size());
}

View File

@ -99,7 +99,7 @@ template <class MESH> class AdvancingFront {
void BuildMesh(CallBackPos call = NULL, int interval = 512)
{
float finalfacesext = mesh.vert.size() * 2.0f;
if(call) call(0, "Advancing front");
if (call) (*call)(0, "Advancing front");
while(1) {
for(int i = 0; i < interval; i++) {

View File

@ -120,7 +120,7 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
targets.push_back(vp);
}
int n = targets.size();
int n = int(targets.size());
if(n<3) continue;
bool success = true;
@ -205,10 +205,10 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
Mark(vv1);
Mark(vv2);
v0 = tri::Index(this->mesh,vv0);
v1 = tri::Index(this->mesh,vv1);
v2 = tri::Index(this->mesh,vv2);
return true;
v0 = int(tri::Index(this->mesh, vv0));
v1 = int(tri::Index(this->mesh, vv1));
v2 = int(tri::Index(this->mesh, vv2));
return true;
}
return false;
}
@ -252,7 +252,7 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
if(nn==0) return -1;
VertexType *candidate = NULL;
ScalarType min_angle = M_PI;
ScalarType min_angle = ScalarType(M_PI);
//
// Loop over all the nearest vertexes and choose the best one according the ball pivoting strategy.
//
@ -312,7 +312,7 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
assert((candidate->P() - v1).Norm() > min_edge);
}
int candidateIndex = tri::Index(this->mesh,candidate);
int candidateIndex = int(tri::Index(this->mesh,candidate));
assert(candidateIndex != edge.v0 && candidateIndex != edge.v1);
Point3x newnormal = ((candidate->P() - v0)^(v1 - v0)).Normalize();

View File

@ -283,7 +283,7 @@ public:
template<class MESH> class MinimumWeightEar : public TrivialEar<MESH>
{
public:
static float &DiedralWeight() { static float _dw=0.1; return _dw;}
static float &DiedralWeight() { static float _dw=0.1f; return _dw;}
typedef TrivialEar<MESH> TE;
typename MESH::ScalarType dihedralRad;
typename MESH::ScalarType aspectRatio;

View File

@ -162,7 +162,7 @@ public:
for (vi = m.vert.begin(); vi != m.vert.end(); ++vi)
if (!(*vi).IsD())
{
ScalarType weight = useQualityAsWeight ? (*vi).Q() : 1.0;
ScalarType weight = useQualityAsWeight ? (*vi).Q() : 1.0f;
accumulator[0] += (double)((*vi).P()[0] * weight);
accumulator[1] += (double)((*vi).P()[1] * weight);
accumulator[2] += (double)((*vi).P()[2] * weight);

View File

@ -790,6 +790,7 @@ static Color4b ColorDesaturate(Color4b c, int method)
}
default: assert(0);
}
return Color4b(255, 255, 255, 255);
}
//ausiliary function to compute average lightness. value = (R+G+B)/3

View File

@ -206,7 +206,7 @@ protected:
inSphVec.push_back(hi);
}
}
return inSphVec.size();
return int(inSphVec.size());
}
size_t RemoveInSphere(const Point3<ScalarType> &p, const ScalarType radius)