diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-10-07 23:21:00 +0900 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-08 06:21:15 +0000 |
commit | ce924d97aaea265b8f58265bedb49dbcd71fbc31 (patch) | |
tree | b534e750f4821ce54c5209cc85e8d616e2fed81e /starmath/source/cursor.cxx | |
parent | bbfc031333aa74fbd4c6362c33405c49c22283f3 (diff) |
starmath: Represent ownership by std::unique_ptr
Change-Id: I7ce39cbdc0199d3508e7d16d1ce0b78f8d8ca620
Reviewed-on: https://gerrit.libreoffice.org/19230
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r-- | starmath/source/cursor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 01c4b375fafa..954563ec88d0 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -114,14 +114,14 @@ void SmCursor::BuildGraph(){ _anchor = mpAnchor->CaretPos; if(mpPosition) _position = mpPosition->CaretPos; - delete mpGraph; + mpGraph.reset(); //Reset anchor and position as they point into an old graph mpAnchor = nullptr; mpPosition = nullptr; } //Build the new graph - mpGraph = SmCaretPosGraphBuildingVisitor(mpTree).takeGraph(); + mpGraph.reset(SmCaretPosGraphBuildingVisitor(mpTree).takeGraph()); //Restore anchor and position pointers if(_anchor.IsValid() || _position.IsValid()){ |