vcl/inc/opengl/VertexUtils.hxx | 8 ++++---- vcl/opengl/RenderList.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit c022a8fd6e153ee14f3d97f147af1abdd32f47e9 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Jun 8 09:29:17 2016 +0300 Not sure why loplugin:passstuffbyref did not warn about these cases? Pass a SalColor by value here, too, for consistency. Change-Id: I17ea621d376670284875d0af4830bf9c6f5da202 diff --git a/vcl/inc/opengl/VertexUtils.hxx b/vcl/inc/opengl/VertexUtils.hxx index 1c4b938..6de658e 100644 --- a/vcl/inc/opengl/VertexUtils.hxx +++ b/vcl/inc/opengl/VertexUtils.hxx @@ -53,11 +53,11 @@ inline void addTrapezoid<GL_TRIANGLES>(std::vector<GLfloat>& rVertices, GLfloat }); } -inline glm::vec4 createGLColor(const SalColor& rColor, GLfloat rTransparency) +inline glm::vec4 createGLColor(SalColor nColor, GLfloat rTransparency) { - return glm::vec4(SALCOLOR_RED(rColor) / 255.0f, - SALCOLOR_GREEN(rColor) / 255.0f, - SALCOLOR_BLUE(rColor) / 255.0f, + return glm::vec4(SALCOLOR_RED(nColor) / 255.0f, + SALCOLOR_GREEN(nColor) / 255.0f, + SALCOLOR_BLUE(nColor) / 255.0f, 1.0f - rTransparency); } diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx index ee1674e..aee6a04 100644 --- a/vcl/opengl/RenderList.cxx +++ b/vcl/opengl/RenderList.cxx @@ -20,7 +20,7 @@ namespace { inline void lclAddLineSegmentVertices(RenderParameters& rRenderParameter, GLfloat fX1, GLfloat fY1, GLfloat fX2, GLfloat fY2, - const SalColor& rColor, double fTransparency) + SalColor nColor, double fTransparency) { glm::vec2 aPoint1(fX1, fY1); glm::vec2 aPoint2(fX2, fY2); @@ -34,7 +34,7 @@ inline void lclAddLineSegmentVertices(RenderParameters& rRenderParameter, GLfloa aPoint1, aNormal, 1.0f, aPoint2, aNormal, 1.0f); - vcl::vertex::addQuadColors<GL_TRIANGLES>(rRenderParameter.maColors, rColor, fTransparency); + vcl::vertex::addQuadColors<GL_TRIANGLES>(rRenderParameter.maColors, nColor, fTransparency); } } // end anonymous namespace _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits