Browse Source

Used tabs instead of spaces

pull/668/head
Ondrej Petrzilka 9 years ago
parent
commit
8605454cba
  1. 6
      ILSpy/SearchPane.cs
  2. 26
      ILSpy/SearchStrategies.cs

6
ILSpy/SearchPane.cs

@ -268,9 +268,9 @@ namespace ICSharpCode.ILSpy
this.Results.Insert(this.Results.Count - 1, result); this.Results.Insert(this.Results.Count - 1, result);
} }
else else
{ {
// Original code // Original code
this.Results.Insert(this.Results.Count - 1, result); this.Results.Insert(this.Results.Count - 1, result);
} }
} }

26
ILSpy/SearchStrategies.cs

@ -32,19 +32,19 @@ namespace ICSharpCode.ILSpy
protected float CalculateFitness(MemberReference member, string text) protected float CalculateFitness(MemberReference member, string text)
{ {
// Ignore generic arguments, it not possible to search based on them either // Ignore generic arguments, it not possible to search based on them either
int length = 0; int length = 0;
int generics = 0; int generics = 0;
for (int i = 0; i < text.Length; i++) for (int i = 0; i < text.Length; i++)
{ {
if (text[i] == '<') if (text[i] == '<')
generics++; generics++;
else if (text[i] == '>') else if (text[i] == '>')
generics--; generics--;
else if (generics == 0) else if (generics == 0)
length++; length++;
} }
return 1.0f / length; return 1.0f / length;
} }
protected bool IsMatch(string text) protected bool IsMatch(string text)

Loading…
Cancel
Save