From 25da38718c68204130adbf176599cc287234095f Mon Sep 17 00:00:00 2001 From: didier Date: Wed, 12 Sep 2018 13:24:48 +0200 Subject: [PATCH] LineBufferOverlay: Result is not floating-point dec/2 is an integer and calling round() doesn't make sense, dec/2.0 is a double From coverity 'integer_division: Dividing integer expressions dec and 2, and then converting the integer quotient to type double. Any remainder, or fractional part of the quotient, is ignored.' --- src/LineBufferOverlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LineBufferOverlay.cpp b/src/LineBufferOverlay.cpp index 69cc2f7d..b6b9d7e8 100644 --- a/src/LineBufferOverlay.cpp +++ b/src/LineBufferOverlay.cpp @@ -153,9 +153,9 @@ void LineBufferOverlay::setLineBuffer() arrow.pushLine( 0, dec, 0, dec - windArrowSize ); // hampe // Right arrow - arrow.pushLine(0, dec - ceil(m_lineWidth / 2 * sqrt(2)), round(dec/4 + (m_lineWidth / 2 * sqrt(2))), round(dec/2)); + arrow.pushLine(0, dec - ceil(m_lineWidth / 2 * sqrt(2)), round(dec/4 + (m_lineWidth / 2 * sqrt(2))), round(dec/2.)); // Left arrow - arrow.pushLine(0, dec - ceil(m_lineWidth / 2 * sqrt(2)), round(-dec/4 - (m_lineWidth / 2 * sqrt(2))), round(dec/2)); + arrow.pushLine(0, dec - ceil(m_lineWidth / 2 * sqrt(2)), round(-dec/4 - (m_lineWidth / 2 * sqrt(2))), round(dec/2.)); } float alpha = 0.38;