From 543ccb3c5a992dafddb9094481083814c3e342cd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 22 Mar 2017 03:37:01 +0100 Subject: [COVERITY] pose-widget: fix integer math where fpu was meant --- pose-widget/glwidget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index de5a139b..17f4e1a2 100644 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -139,10 +139,10 @@ void GLWidget::project_quad_texture() const vec3 dst_corners[] = { - vec3(-sx_/2. * c, -sy_/2, 0), - vec3(sx_/2 * c, -sy_/2, 0), - vec3(-sx_/2 * c, sy_/2, 0), - vec3(sx_/2 * c, sy_/2, 0.) + vec3(-sx_/2. * c, -sy_/2., 0), + vec3(sx_/2. * c, -sy_/2., 0), + vec3(-sx_/2. * c, sy_/2., 0), + vec3(sx_/2. * c, sy_/2., 0.) }; for (int i = 0; i < 4; i++) @@ -272,7 +272,7 @@ vec2 GLWidget::project(const vec3 &point) { vec3 ret = rotation * point; num z = std::max(.75f, 1 + translation.z()/-60); - int w = width(), h = height(); + num w = width(), h = height(); num x = w * translation.x() / 2 / -40; if (std::abs(x) > w/2) x = x > 0 ? w/2 : w/-2; -- cgit v1.2.3