Kaydet (Commit) cea2ae07 authored tarafından Caolán McNamara's avatar Caolán McNamara

cppcheck: the scope of this variable can be reduced

üst a8be1976
...@@ -393,8 +393,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList, ...@@ -393,8 +393,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
SmTextNode* pText = (SmTextNode*)*it; SmTextNode* pText = (SmTextNode*)*it;
String aText = pText->GetText(); String aText = pText->GetText();
//Start and lengths of the segments, 2 is the selected segment //Start and lengths of the segments, 2 is the selected segment
int start1 = 0, int start2 = pText->GetSelectionStart(),
start2 = pText->GetSelectionStart(),
start3 = pText->GetSelectionEnd(), start3 = pText->GetSelectionEnd(),
len1 = start2 - 0, len1 = start2 - 0,
len2 = start3 - start2, len2 = start3 - start2,
...@@ -403,6 +402,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList, ...@@ -403,6 +402,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
USHORT eFontDesc = pText->GetFontDesc(); USHORT eFontDesc = pText->GetFontDesc();
//If we need make segment 1 //If we need make segment 1
if(len1 > 0) { if(len1 > 0) {
int start1 = 0,
String str = aText.Copy(start1, len1); String str = aText.Copy(start1, len1);
pText->ChangeText(str); pText->ChangeText(str);
it++; it++;
......
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