Commit b7aabbd9 authored by Jan Möbius's avatar Jan Möbius

Fixed some warnings

parent 0132a367
Pipeline #3328 passed with stage
in 67 minutes and 37 seconds
......@@ -154,10 +154,10 @@ QGLViewerWidget::~QGLViewerWidget()
void
QGLViewerWidget::setDefaultMaterial(void)
{
GLfloat mat_a[] = {0.1, 0.1, 0.1, 1.0};
GLfloat mat_d[] = {0.7, 0.7, 0.5, 1.0};
GLfloat mat_s[] = {1.0, 1.0, 1.0, 1.0};
GLfloat shine[] = {120.0};
GLfloat mat_a[] = {0.1f, 0.1f, 0.1f, 1.0f};
GLfloat mat_d[] = {0.7f, 0.7f, 0.5f, 1.0f};
GLfloat mat_s[] = {1.0f, 1.0f, 1.0f, 1.0f};
GLfloat shine[] = {120.0f};
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_a);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_d);
......@@ -171,12 +171,12 @@ QGLViewerWidget::setDefaultMaterial(void)
void
QGLViewerWidget::setDefaultLight(void)
{
GLfloat pos1[] = { 0.1, 0.1, -0.02, 0.0};
GLfloat pos2[] = {-0.1, 0.1, -0.02, 0.0};
GLfloat pos3[] = { 0.0, 0.0, 0.1, 0.0};
GLfloat col1[] = { 0.7, 0.7, 0.8, 1.0};
GLfloat col2[] = { 0.8, 0.7, 0.7, 1.0};
GLfloat col3[] = { 1.0, 1.0, 1.0, 1.0};
GLfloat pos1[] = { 0.1f, 0.1f, -0.02f, 0.0f};
GLfloat pos2[] = {-0.1f, 0.1f, -0.02f, 0.0f};
GLfloat pos3[] = { 0.0f, 0.0f, 0.1f, 0.0f};
GLfloat col1[] = { 0.7f, 0.7f, 0.8f, 1.0f};
GLfloat col2[] = { 0.8f, 0.7f, 0.7f, 1.0f};
GLfloat col3[] = { 1.0f, 1.0f, 1.0f, 1.0f};
glEnable(GL_LIGHT0);
glLightfv(GL_LIGHT0,GL_POSITION, pos1);
......@@ -214,10 +214,10 @@ QGLViewerWidget::initializeGL()
setDefaultLight();
// Fog
GLfloat fogColor[4] = { 0.3, 0.3, 0.4, 1.0 };
GLfloat fogColor[4] = { 0.3f, 0.3f, 0.4f, 1.0f };
glFogi(GL_FOG_MODE, GL_LINEAR);
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_DENSITY, 0.35);
glFogf(GL_FOG_DENSITY, 0.35f);
glHint(GL_FOG_HINT, GL_DONT_CARE);
glFogf(GL_FOG_START, 5.0f);
glFogf(GL_FOG_END, 25.0f);
......
......@@ -1077,7 +1077,7 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
trim(line);
// Handle '\r\n' newlines
const int s = line.size();
const size_t s = line.size();
if( s > 0 && line[s - 1] == '\r') line.resize(s - 1);
//Check if this file is really a ply format
......
......@@ -123,7 +123,7 @@ compute_new_positions_C0()
u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
// damping
u *= 0.5;
u *= static_cast< typename Mesh::Scalar >(0.5);
// store new position
p = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
......
......@@ -863,7 +863,7 @@ void VF<M>::raise(typename M::FaceHandle& _fh, state_t _target_state)
if (Base::number() == Base::subdiv_rule()->number() + 1 &&
Base::mesh_.is_boundary(_fh) &&
!MOBJ(_fh).final())
position *= 0.5;
position *= static_cast<typename M::Scalar>(0.5);
MOBJ(_fh).set_position(_target_state, position);
MOBJ(_fh).inc_state();
......
......@@ -309,7 +309,7 @@ CatmullClarkT<MeshType,RealType>::compute_midpoint( MeshType& _m, const EdgeHand
// this yields the [1/2 1/2] mask
if (_m.is_boundary(_eh) || !_update_points)
{
pos *= 0.5;
pos *= static_cast<RealType>(0.5);
}
// else if (_m.status(_eh).selected() )
// {
......@@ -321,7 +321,7 @@ CatmullClarkT<MeshType,RealType>::compute_midpoint( MeshType& _m, const EdgeHand
{
pos += _m.property(fp_pos_, _m.face_handle(heh));
pos += _m.property(fp_pos_, _m.face_handle(opp_heh));
pos *= 0.25;
pos *= static_cast<RealType>(0.25);
}
_m.property( ep_pos_, _eh ) = pos;
}
......
......@@ -111,10 +111,10 @@ TEST_F(OpenMeshSmoother_Poly, Smoother_Triangle_Laplace) {
OpenMesh::Smoother::JacobiLaplaceSmootherT<PolyMesh> smoother(mesh_);;
// Just call function to instantiate template
smoother.set_absolute_local_error(0.5);
smoother.set_absolute_local_error(0.5f);
// Set an error
smoother.set_relative_local_error(0.1);
smoother.set_relative_local_error(0.1f);
// Run algorithm with 5 steps
smoother.smooth(5);
......
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