[Libreoffice-commits] core.git: Branch 'feature/chart-opengl2' - chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Wed Jan 15 13:41:28 PST 2014


 chart2/source/view/main/OpenGLRender.cxx |   12 ++++++------
 chart2/source/view/main/OpenGLRender.hxx |    2 --
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 47fa05a1513b6c6584284f9a06666bb50897ecad
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Wed Jan 15 22:39:10 2014 +0100

    no need for a member variable
    
    Change-Id: I58b22d123e4ba0dddeef5054492a1f851447857b

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index a73b39a..77018c1 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -931,7 +931,6 @@ OpenGLRender::OpenGLRender(uno::Reference< drawing::XShape > xTarget):
     m_ClearColor(glm::vec4(1.0f, 1.0f, 1.0f, 1.0f))
 {
     //TODO: moggi: use STL
-    memset(&m_Bubble2DPointList, 0, sizeof(m_Bubble2DPointList));
     memset(&m_Bubble2DCircle, 0, sizeof(m_Bubble2DCircle));
     memset(&m_TextInfo, 0, sizeof(TextInfo));
 
@@ -1266,12 +1265,13 @@ int OpenGLRender::Bubble2DShapePoint(float x, float y, float directionX, float d
 
     float actualX = (x / OPENGL_SCALE_VALUE);
     float actualY = (y / OPENGL_SCALE_VALUE);
-    m_Bubble2DPointList.x = actualX;
-    m_Bubble2DPointList.y = actualY;
-    m_Bubble2DPointList.xScale = directionX / OPENGL_SCALE_VALUE;
-    m_Bubble2DPointList.yScale = directionY / OPENGL_SCALE_VALUE;
+    Bubble2DPointList aBubble2DPointList;
+    aBubble2DPointList.x = actualX;
+    aBubble2DPointList.y = actualY;
+    aBubble2DPointList.xScale = directionX / OPENGL_SCALE_VALUE;
+    aBubble2DPointList.yScale = directionY / OPENGL_SCALE_VALUE;
 
-    m_Bubble2DShapePointList.push_back(m_Bubble2DPointList);
+    m_Bubble2DShapePointList.push_back(aBubble2DPointList);
     return 0;
 }
 
diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx
index 815d7d3..2e8e6e0 100644
--- a/chart2/source/view/main/OpenGLRender.hxx
+++ b/chart2/source/view/main/OpenGLRender.hxx
@@ -263,8 +263,6 @@ private:
 
     Bubble2DCircle m_Bubble2DCircle;
 
-    Bubble2DPointList m_Bubble2DPointList;
-
     std::list <Bubble2DPointList> m_Bubble2DShapePointList;
     GLint m_CommonProID;
     GLint m_2DVertexID;


More information about the Libreoffice-commits mailing list