summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-06-08 09:29:17 +0300
committerTor Lillqvist <tml@collabora.com>2016-06-08 09:42:20 +0300
commitc022a8fd6e153ee14f3d97f147af1abdd32f47e9 (patch)
tree3328668811062105696e842ab1535e34602cecfa /vcl
parent80c874dc87ad3018df6e6f0edb7cca174f75db37 (diff)
Not sure why loplugin:passstuffbyref did not warn about these cases?
Pass a SalColor by value here, too, for consistency. Change-Id: I17ea621d376670284875d0af4830bf9c6f5da202
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/opengl/VertexUtils.hxx8
-rw-r--r--vcl/opengl/RenderList.cxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/inc/opengl/VertexUtils.hxx b/vcl/inc/opengl/VertexUtils.hxx
index 1c4b9386f153..6de658e14d54 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 ee1674eddf19..aee6a0411d77 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