Kaydet (Commit) f36406bf authored tarafından Takeshi Abe's avatar Takeshi Abe

starmath: Avoid assigned but unused value

Change-Id: I3d8ede40e2231e3b88c43b17e353ea962e02acc7
üst aa21f8ac
...@@ -296,9 +296,6 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){ ...@@ -296,9 +296,6 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){
//Begin edit section //Begin edit section
BeginEdit(); BeginEdit();
//Position after insert should be after pNewNode
SmCaretPos PosAfterInsert = SmCaretPos(pNewNodes->back(), 1);
//Get the current position //Get the current position
const SmCaretPos pos = mpPosition->CaretPos; const SmCaretPos pos = mpPosition->CaretPos;
...@@ -324,14 +321,10 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){ ...@@ -324,14 +321,10 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){
insIt = pLineList->insert(it, *newIt); insIt = pLineList->insert(it, *newIt);
if(newIt == pNewNodes->begin()) if(newIt == pNewNodes->begin())
patchIt = insIt; 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 //Patch the places we've changed stuff
PatchLineList(pLineList, patchIt); PatchLineList(pLineList, patchIt);
PosAfterInsert = PatchLineList(pLineList, it); SmCaretPos PosAfterInsert = PatchLineList(pLineList, it);
//Release list, we've taken the nodes //Release list, we've taken the nodes
delete pNewNodes; delete pNewNodes;
pNewNodes = nullptr; pNewNodes = nullptr;
......
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