diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-06 11:58:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-06 11:41:46 +0000 |
commit | f1945405b08cad5138345882cb68c64edeeabdae (patch) | |
tree | f0622d2970097e7e80050fcb19559844563334e1 /chart2/source | |
parent | 0840bc7957117b8913e3d7d5848bbc4524b4949e (diff) |
loplugin:redundantcast check for c-style float casts
Change-Id: I86b6f58887cb398a80698f8d8564b5bc3f55eabb
Reviewed-on: https://gerrit.libreoffice.org/36198
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 6 | ||||
-rw-r--r-- | chart2/source/view/main/VButton.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 33e6b1f367fb..0f96e878bb04 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -841,8 +841,8 @@ void GL3DBarChart::create3DShapes(const std::vector<std::unique_ptr<VDataSeries> //if scroll the bars, set the speed and distance first if (mbScrollFlg) { - mpRenderer->SetScrollSpeed((float)(BAR_SIZE_X + BAR_DISTANCE_X) / (float)miScrollRate); - mpRenderer->SetScrollDistance((float)(BAR_SIZE_X + BAR_DISTANCE_X)); + mpRenderer->SetScrollSpeed((BAR_SIZE_X + BAR_DISTANCE_X) / (float)miScrollRate); + mpRenderer->SetScrollDistance(BAR_SIZE_X + BAR_DISTANCE_X); } spawnRenderThread(new RenderBenchMarkThread(this)); } diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index c00bd18f6521..fe4e7e8e9449 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -1416,7 +1416,7 @@ void OpenGL3DRenderer::RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D { // the height of rounded corner is higher than the cube than use the org scale matrix // yScale /= (float)(1 + BOTTOM_THRESHOLD); - zScale /= (float)(m_RoundBarMesh.bottomThreshold); + zScale /= m_RoundBarMesh.bottomThreshold; PosVecf3 scale = {xyScale, xyScale, zScale}; glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); glm::mat4 aScaleMatrix = glm::scale(glm::vec3(scale.x, scale.y, scale.z)); @@ -1505,7 +1505,7 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D) { // the height of rounded corner is higher than the cube than use the org scale matrix //yScale /= (float)(1 + BOTTOM_THRESHOLD); - zScale /= (float)(m_RoundBarMesh.bottomThreshold); + zScale /= m_RoundBarMesh.bottomThreshold; glm::mat4 orgTrans = glm::translate(glm::vec3(0.0, 0.0, -1.0)); glm::mat4 scale = glm::scale(glm::vec3(xyScale, xyScale, zScale)); //MoveModelf(trans, angle, scale); @@ -2306,7 +2306,7 @@ void OpenGL3DRenderer::GetBatchTopAndFlatInfo(const Extrude3DInfo &extrude3D) { // the height of rounded corner is higher than the cube than use the org scale matrix //yScale /= (float)(1 + BOTTOM_THRESHOLD); - zScale /= (float)(m_RoundBarMesh.bottomThreshold); + zScale /= m_RoundBarMesh.bottomThreshold; glm::mat4 scale = glm::scale(glm::vec3(xyScale, xyScale, zScale)); //MoveModelf(trans, angle, scale); glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx index 406de6abe96f..996ceff2c288 100644 --- a/chart2/source/view/main/VButton.cxx +++ b/chart2/source/view/main/VButton.cxx @@ -49,7 +49,7 @@ void VButton::createShapes(const awt::Point& rPosition, PropertyMapper::getTextLabelMultiPropertyLists(xTextProp, *pPropNames, *pPropValues); tPropertyNameValueMap aTextValueMap; - aTextValueMap["CharHeight"] <<= (float)10.0f; + aTextValueMap["CharHeight"] <<= 10.0f; aTextValueMap["FillColor"] <<= (sal_Int32)0xe6e6e6; aTextValueMap["FillStyle"] <<= drawing::FillStyle_SOLID; aTextValueMap["LineColor"] <<= (sal_Int32)0xcccccc; |