OSDN Git Service

PATCH: [ 1189875 ] Small cleanup for line replace code
authorKimmo Varis <kimmov@gmail.com>
Tue, 26 Apr 2005 15:22:35 +0000 (15:22 +0000)
committerKimmo Varis <kimmov@gmail.com>
Tue, 26 Apr 2005 15:22:35 +0000 (15:22 +0000)
Src/MergeDoc.cpp
Src/readme.txt

index 1d6f3e0..70a85e6 100644 (file)
@@ -1739,9 +1739,8 @@ void CMergeDoc::CDiffTextBuffer::ReplaceFullLine(CCrystalTextView * pSource, int
        {
                // (optimization) eols are the same, so just replace text inside line
                // we must clean strText from its eol...
-               CString strTextWithoutEol = strText;
-               int newLength = strTextWithoutEol.GetLength()- _tcslen(getEol(strTextWithoutEol));
-               strTextWithoutEol.ReleaseBuffer(newLength);
+               int eolLength = _tcslen(getEol(strText));
+               CString strTextWithoutEol = strText.Left(strText.GetLength() - eolLength);
                ReplaceLine(pSource, nLine, strTextWithoutEol, nAction);
                return;
        }
index bb1bf85..433fd5d 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-26 Kimmo
+ PATCH: [ 1189875 ] Small cleanup for line replace code
+  Src: MergeDoc.cpp
+
 2005-04-25 Kimmo
  BUG: [ 1179790 ] ReadMe-Hungarian.rtf file is missing
   docs/Users/Languages new file: Read Me-Hungarian.rtf