diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-04-22 15:57:28 +0900 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-04-22 07:29:32 +0000 |
commit | 0cd0206fa4392d43724f630555994af842fc0733 (patch) | |
tree | b8e099f01cab12842bee86f762cef4c569f53fc2 /starmath/inc | |
parent | a1a25f4c6c99c0c519cc60d842041d56ae8a6f1c (diff) |
use std::unique_ptr<> to clarify ownership
This also prepends the m prefix to member variables.
Change-Id: I465173a6b11717c42800a89fd481b3d310a9df24
Reviewed-on: https://gerrit.libreoffice.org/15476
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/visitors.hxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index 5ae12773d673..2544d95dad8b 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -11,6 +11,7 @@ #include "node.hxx" #include "caret.hxx" +#include <memory> /** Base class for visitors that visits a tree of SmNodes * @remarks all methods have been left abstract to ensure that implementers @@ -319,13 +320,11 @@ public: void Visit( SmVerticalBraceNode* pNode ) SAL_OVERRIDE; SmCaretPosGraph* takeGraph() { - SmCaretPosGraph *pRet = pGraph; - pGraph = 0; - return pRet; + return mpGraph.release(); } private: - SmCaretPosGraphEntry* pRightMost; - SmCaretPosGraph* pGraph; + SmCaretPosGraphEntry* mpRightMost; + std::unique_ptr<SmCaretPosGraph> mpGraph; }; // SmCloningVisitor |