diff --git a/GraphicsView/include/CGAL/Buffer_for_vao.h b/GraphicsView/include/CGAL/Buffer_for_vao.h index c70d4a920a2..366ab655767 100644 --- a/GraphicsView/include/CGAL/Buffer_for_vao.h +++ b/GraphicsView/include/CGAL/Buffer_for_vao.h @@ -460,9 +460,9 @@ public: static void add_point_in_buffer(const KPoint& kp, std::vector& buffer) { Local_point p=get_local_point(kp); - buffer.push_back(p.x()); - buffer.push_back(p.y()); - buffer.push_back(p.z()); + buffer.push_back(static_cast(p.x())); + buffer.push_back(static_cast(p.y())); + buffer.push_back(static_cast(p.z())); } /// adds `kv` coordinates to `buffer` @@ -471,9 +471,9 @@ public: bool inverse_normal=false) { Local_vector n=(inverse_normal?-get_local_vector(kv):get_local_vector(kv)); - buffer.push_back(n.x()); - buffer.push_back(n.y()); - buffer.push_back(n.z()); + buffer.push_back(static_cast(n.x())); + buffer.push_back(static_cast(n.y())); + buffer.push_back(static_cast(n.z())); } ///adds `acolor` RGB components to `buffer` diff --git a/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h b/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h index 617f1df0f7d..96d03db9adc 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h @@ -251,7 +251,7 @@ CGAL_INLINE_FUNCTION void ManipulatedFrame::computeMouseSpeed(const QMouseEvent *const e) { const QPoint delta = (e->pos() - prevPos_); const qreal dist = sqrt(qreal(delta.x() * delta.x() + delta.y() * delta.y())); - delay_ = last_move_time.restart(); + delay_ = static_cast(last_move_time.restart()); if (delay_ == 0) // Less than a millisecond: assume delay = 1ms mouseSpeed_ = dist; diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 8b2cad8f9a1..0dc7256cb38 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -2248,7 +2248,7 @@ void CGAL::QGLViewer::keyPressEvent(QKeyEvent *e) { static QElapsedTimer doublePress; if (modifiers == playPathKeyboardModifiers()) { - int elapsed = doublePress.restart(); + qint64 elapsed = doublePress.restart(); if ((elapsed < 250) && (index == previousPathId_)) camera()->resetPath(index); else { @@ -2263,7 +2263,7 @@ void CGAL::QGLViewer::keyPressEvent(QKeyEvent *e) { } previousPathId_ = index; } else if (modifiers == addKeyFrameKeyboardModifiers()) { - int elapsed = doublePress.restart(); + qint64 elapsed = doublePress.restart(); if ((elapsed < 250) && (index == previousPathId_)) { if (camera()->keyFrameInterpolator(index)) { disconnect(camera()->keyFrameInterpolator(index), diff --git a/Polyhedron/demo/Polyhedron/Color_map.h b/Polyhedron/demo/Polyhedron/Color_map.h index 46164c649cb..2e04a3ee5bd 100644 --- a/Polyhedron/demo/Polyhedron/Color_map.h +++ b/Polyhedron/demo/Polyhedron/Color_map.h @@ -8,7 +8,7 @@ inline QColor generate_color(double h, double s_min = 0.35) std::size_t s_max=255; if(h >0.8 && h < 0.95) //span of ugly pink, desaturates make it less garish IMO s_max = 160; - std::size_t s = std::rand() % (s_max-static_cast(s_min*255)) +s_min*255; + std::size_t s = std::rand() % (s_max-static_cast(s_min*255)) + static_cast(s_min*255); return QColor::fromHsvF(h,s/255.0,1.0); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_rib_exporter_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_rib_exporter_plugin.cpp index 89b8a92ecc3..edf8e6b13f7 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_rib_exporter_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_rib_exporter_plugin.cpp @@ -755,8 +755,8 @@ write_surface_cells(const C3t3& c3t3, const Plane& /* plane */, std::ofstream& o //const int TRANSPARENCY_ALPHA_VALUE = 100; CGAL::Bbox_3 bbox = c3t3.bbox(); - float relPos = (c->weighted_circumcenter().x() - bbox.xmin()) - / (bbox.xmax() - bbox.xmin()); + float relPos = static_cast((c->weighted_circumcenter().x() - bbox.xmin()) + / (bbox.xmax() - bbox.xmin())); float TRANSPARENCY_ALPHA_VALUE = 1.f - (relPos < 0.25f ? @@ -842,7 +842,7 @@ write_surface_cells(const C3t3& c3t3, const Plane& /* plane */, std::ofstream& o { if (i == last_2D_vertex_index) { - edgecolor.setAlpha(TRANSPARENCY_ALPHA_VALUE); + edgecolor.setAlphaF(TRANSPARENCY_ALPHA_VALUE); } else { diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_plugin.cpp index 269eb121ae4..abc04bc2849 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_plugin.cpp @@ -777,7 +777,8 @@ void Basic_generator_plugin::generateGrid() QString points_text; Point extrema[2]; - typename boost::graph_traits::vertices_size_type nb_cells[2]; + using size_type = typename boost::graph_traits::vertices_size_type; + size_type nb_cells[2]; bool triangulated = dock_widget->grid_checkBox->isChecked(); points_text= dock_widget->grid_lineEdit->text(); @@ -806,8 +807,8 @@ void Basic_generator_plugin::generateGrid() } extrema[0] = Point(coords[0], coords[1], coords[2]); extrema[1] = Point(coords[3], coords[4], coords[5]); - nb_cells[0] = static_cast(dock_widget->gridX_spinBox->value()); - nb_cells[1] = static_cast(dock_widget->gridY_spinBox->value()); + nb_cells[0] = static_cast(dock_widget->gridX_spinBox->value()); + nb_cells[1] = static_cast(dock_widget->gridY_spinBox->value()); //nb_points = nb_cells+1 Point_generator point_gen(nb_cells[0]+1, nb_cells[1]+1, extrema[0], extrema[1]);