diff options
author | Dani Megert | 2003-11-24 09:25:10 +0000 |
---|---|---|
committer | Dani Megert | 2003-11-24 09:25:10 +0000 |
commit | 75276a105a190dcef6979d6176f68959ad57e716 (patch) | |
tree | e4fa107cd0f525bf014b2db81b30da6e79bee05f /org.eclipse.text/src/org/eclipse/jface | |
parent | dbe90800b9c404293dd068ab1e0ce4cf0b8d86a7 (diff) | |
download | eclipse.platform.text-75276a105a190dcef6979d6176f68959ad57e716.tar.gz eclipse.platform.text-75276a105a190dcef6979d6176f68959ad57e716.tar.xz eclipse.platform.text-75276a105a190dcef6979d6176f68959ad57e716.zip |
Replaced while with for [performance]
Diffstat (limited to 'org.eclipse.text/src/org/eclipse/jface')
-rw-r--r-- | org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java b/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java index cf9c96d0c1d..f8ac27b304d 100644 --- a/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java +++ b/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java @@ -232,9 +232,8 @@ public class FindReplaceDocumentAdapter implements CharSequence { StringBuffer out= new StringBuffer(string.length()); boolean quoting= false; - int i= 0; - while (i < string.length()) { - char ch= string.charAt(i++); + for (int i= 0, length= string.length(); i < length; i++) { + char ch= string.charAt(i); if (ch == '\\') { if (quoting) { out.append("\\E"); //$NON-NLS-1$ |