diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-15 17:32:31 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-17 14:45:07 +0900 |
commit | f36406bf441704d8904f860d81774f0f89ab270a (patch) | |
tree | f4bac1736b567416600706827d0dd3c5689d7be2 /starmath | |
parent | aa21f8acfa4d4997688ef4ddc04fcf95987e3424 (diff) |
starmath: Avoid assigned but unused value
Change-Id: I3d8ede40e2231e3b88c43b17e353ea962e02acc7
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/cursor.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index d3a54ff8fe90..047e2883f197 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -296,9 +296,6 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){ //Begin edit section BeginEdit(); - //Position after insert should be after pNewNode - SmCaretPos PosAfterInsert = SmCaretPos(pNewNodes->back(), 1); - //Get the current position const SmCaretPos pos = mpPosition->CaretPos; @@ -324,14 +321,10 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){ insIt = pLineList->insert(it, *newIt); if(newIt == pNewNodes->begin()) patchIt = insIt; - if((*newIt)->GetType() == NTEXT) - PosAfterInsert = SmCaretPos(*newIt, static_cast<SmTextNode*>(*newIt)->GetText().getLength()); - else - PosAfterInsert = SmCaretPos(*newIt, 1); } //Patch the places we've changed stuff PatchLineList(pLineList, patchIt); - PosAfterInsert = PatchLineList(pLineList, it); + SmCaretPos PosAfterInsert = PatchLineList(pLineList, it); //Release list, we've taken the nodes delete pNewNodes; pNewNodes = nullptr; |