Commit 85e183ae authored by Jan Möbius's avatar Jan Möbius

Fixed VS2015 warnings

parent bb75d702
Pipeline #3519 failed with stage
in 24 minutes and 39 seconds
......@@ -346,7 +346,7 @@ CatmullClarkT<MeshType,RealType>::update_vertex( MeshType& _m, const VertexHandl
for ( ve_itr = _m.ve_iter( _vh); ve_itr.is_valid(); ++ve_itr)
if ( _m.is_boundary( *ve_itr))
pos += _m.property( ep_pos_, *ve_itr);
pos /= 3.0;
pos /= static_cast<MeshType::Point::value_type>(3.0);
}
else // inner vertex
{
......
......@@ -116,7 +116,7 @@ void CompositeT<MeshType,RealType>::Tvv3()
// set new positions for vertices
v_it = mesh_.vertices_begin();
for (j = 0; j < n_vertices; ++j) {
mesh_.data(*v_it).set_position(mesh_.data(*v_it).position() * 3.0);
mesh_.data(*v_it).set_position(mesh_.data(*v_it).position() * static_cast<MeshType::Point::value_type>(3.0) );
++v_it;
}
......@@ -180,7 +180,7 @@ void CompositeT<MeshType,RealType>::Tvv4()
// set new positions for vertices
v_it = mesh_.vertices_begin();
for (j = 0; j < n_vertices; ++j) {
mesh_.data(*v_it).set_position(mesh_.data(*v_it).position() * 4.0);
mesh_.data(*v_it).set_position(mesh_.data(*v_it).position() * static_cast<MeshType::Point::value_type>(4.0) );
++v_it;
}
......@@ -1250,7 +1250,7 @@ CompositeT<MeshType,RealType>::split_edge(HalfedgeHandle _heh)
vh2(mesh_.from_vertex_handle(_heh));
// Calculate and Insert Midpoint of Edge
vh = mesh_.add_vertex((mesh_.point(vh2) + mesh_.point(vh1)) / 2.0);
vh = mesh_.add_vertex((mesh_.point(vh2) + mesh_.point(vh1)) / static_cast<MeshType::Point::value_type>(2.0) );
// Re-Set Handles
heh2 = mesh_.opposite_halfedge_handle(_heh);
......
......@@ -326,7 +326,7 @@ private: // topological modifiers
typename mesh_t::VertexHandle vh1(_m.to_vertex_handle(heh));
typename mesh_t::Point midP(_m.point(_m.to_vertex_handle(heh)));
midP += _m.point(_m.to_vertex_handle(opp_heh));
midP *= 0.5;
midP *= static_cast<mesh_t::Point::value_type>(0.5);
// new vertex
vh = _m.new_vertex( midP );
......@@ -394,7 +394,7 @@ private: // geometry helper
// boundary edge: just average vertex positions
if (_m.is_boundary(_eh) )
{
pos *= 0.5;
pos *= static_cast<MeshType::Point::value_type>(0.5);
}
else // inner edge: add neighbouring Vertices to sum
{
......
......@@ -150,7 +150,7 @@ public:
{
weights[K].resize(K+1);
// s(j) = ( 1/4 + cos(2*pi*j/K) + 1/2 * cos(4*pi*j/K) )/K
real_t invK = 1.0/real_t(K);
real_t invK = static_cast<real_t>(1.0)/real_t(K);
real_t sum = 0;
for(unsigned int j=0; j<K; ++j)
{
......@@ -390,7 +390,7 @@ private: // geometry helper
{
pos = _m.point(a_0);
pos += _m.point(a_1);
pos *= 9.0/16;
pos *= static_cast<mesh_t::Point::value_type>(9.0/16.0);
typename mesh_t::Point tpos;
if(_m.is_boundary(heh))
{
......@@ -403,7 +403,7 @@ private: // geometry helper
tpos = _m.point(_m.to_vertex_handle(_m.next_halfedge_handle(opp_heh)));
tpos += _m.point(_m.to_vertex_handle(_m.opposite_halfedge_handle(_m.prev_halfedge_handle(opp_heh))));
}
tpos *= -1.0/16;
tpos *= static_cast<mesh_t::Point::value_type>(-1.0/16.0);
pos += tpos;
}
else
......@@ -506,7 +506,7 @@ private: // geometry helper
}
else //at least one endpoint is [irregular and not in boundary]
{
double normFactor = 0.0;
typename mesh_t::Point::value_type normFactor = static_cast<typename mesh_t::Point::value_type>(0.0);
if(valence_a_0!=6 && !_m.is_boundary(a_0))
{
......
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