Browse Source

remove unused indexes

pull/15/head
Eusebiu Marcu 15 years ago
parent
commit
41bbfec826
  1. 11
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpBracketSearcher.cs
  2. 11
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetBracketSearcher.cs

11
src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpBracketSearcher.cs

@ -23,16 +23,13 @@ namespace CSharpBinding @@ -23,16 +23,13 @@ namespace CSharpBinding
if (offset > 0) {
char c = document.GetCharAt(offset - 1);
int index = openingBrackets.IndexOf(c);
int otherOffset = -1; int ind = -1;
if (index > -1) {
int otherOffset = -1;
if (index > -1)
otherOffset = SearchBracketForward(document, offset, openingBrackets[index], closingBrackets[index]);
ind = index;
}
index = closingBrackets.IndexOf(c);
if (index > -1) {
if (index > -1)
otherOffset = SearchBracketBackward(document, offset - 2, openingBrackets[index], closingBrackets[index]);
ind = index;
}
if (otherOffset > -1)
return new BracketSearchResult(Math.Min(offset - 1, otherOffset), 1,

11
src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetBracketSearcher.cs

@ -23,16 +23,13 @@ namespace ICSharpCode.VBNetBinding @@ -23,16 +23,13 @@ namespace ICSharpCode.VBNetBinding
if (offset > 0) {
char c = document.GetCharAt(offset - 1);
int index = openingBrackets.IndexOf(c);
int otherOffset = -1; int ind = -1;
if (index > -1) {
int otherOffset = -1;
if (index > -1)
otherOffset = SearchBracketForward(document, offset, openingBrackets[index], closingBrackets[index]);
ind = index;
}
index = closingBrackets.IndexOf(c);
if (index > -1) {
if (index > -1)
otherOffset = SearchBracketBackward(document, offset - 2, openingBrackets[index], closingBrackets[index]);
ind = index;
}
if (otherOffset > -1)
return new BracketSearchResult(Math.Min(offset - 1, otherOffset), 1,

Loading…
Cancel
Save