Kaydet (Commit) f96908e1 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

pass by const reference

Change-Id: I1d1fff8b596d75a4cb033679d06b300402dbf212
üst 25df8adb
...@@ -108,10 +108,12 @@ private: ...@@ -108,10 +108,12 @@ private:
class ScreenText : public Renderable3DObject class ScreenText : public Renderable3DObject
{ {
public: public:
ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId); ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& rStr,
const glm::vec4& rColor, sal_uInt32 nId);
virtual void render() SAL_OVERRIDE; virtual void render() SAL_OVERRIDE;
void setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight, glm::vec3 r3DPos = glm::vec3(0.0, 0.0, 0.0)); void setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight,
const glm::vec3& r3DPos = glm::vec3(0.0, 0.0, 0.0));
private: private:
TextCacheItem maText; TextCacheItem maText;
......
...@@ -128,14 +128,16 @@ void Text::setPosition(const glm::vec3& rTopLeft, const glm::vec3& rTopRight, co ...@@ -128,14 +128,16 @@ void Text::setPosition(const glm::vec3& rTopLeft, const glm::vec3& rTopRight, co
maBottomRight = rBottomRight; maBottomRight = rBottomRight;
} }
ScreenText::ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId): ScreenText::ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache,
const OUString& rStr, const glm::vec4& rColor, sal_uInt32 nId):
Renderable3DObject(pRenderer, nId), Renderable3DObject(pRenderer, nId),
maText(rTextCache.getText(rStr)), maText(rTextCache.getText(rStr)),
maColor(rColor) maColor(rColor)
{ {
} }
void ScreenText::setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight, glm::vec3 r3DPos) void ScreenText::setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight,
const glm::vec3& r3DPos)
{ {
maTopLeft = rTopLeft; maTopLeft = rTopLeft;
maBottomRight = rBottomRight; maBottomRight = rBottomRight;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment