Browse Source

Remove unused 'IList<string>[] interestingFileNames' from CSharpSymbolSearch

pull/507/head
Daniel Grunwald 11 years ago
parent
commit
6fc6bab462
  1. 21
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs

21
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs

@ -52,14 +52,13 @@ namespace CSharpBinding
/// </summary> /// </summary>
public class CSharpSymbolSearch : ISymbolSearch public class CSharpSymbolSearch : ISymbolSearch
{ {
IProject project; readonly IProject project;
ICompilation compilation; readonly ICompilation compilation;
FindReferences fr = new FindReferences(); readonly FindReferences fr = new FindReferences();
IList<IFindReferenceSearchScope> searchScopes; readonly IList<IFindReferenceSearchScope> searchScopes;
IList<string>[] interestingFileNames; readonly Dictionary<string, IList<IFindReferenceSearchScope>> searchScopesPerFile;
Dictionary<string, IList<IFindReferenceSearchScope>> searchScopesPerFile; readonly int workAmount;
int workAmount; readonly double workAmountInverse;
double workAmountInverse;
public CSharpSymbolSearch(IProject project, ISymbol entity) public CSharpSymbolSearch(IProject project, ISymbol entity)
{ {
@ -73,17 +72,15 @@ namespace CSharpBinding
} }
searchScopesPerFile = new Dictionary<string, IList<IFindReferenceSearchScope>>(); searchScopesPerFile = new Dictionary<string, IList<IFindReferenceSearchScope>>();
interestingFileNames = new IList<string>[searchScopes.Count];
for (int i = 0; i < searchScopes.Count; i++) { for (int i = 0; i < searchScopes.Count; i++) {
var thisSearchScope = searchScopes[i]; var thisSearchScope = searchScopes[i];
var interestingFiles = fr.GetInterestingFiles(thisSearchScope, compilation).Select(f => f.FileName).ToList(); var interestingFiles = fr.GetInterestingFiles(thisSearchScope, compilation).Select(f => f.FileName);
foreach (var file in interestingFiles) { foreach (var file in interestingFiles) {
if (!searchScopesPerFile.ContainsKey(file)) if (!searchScopesPerFile.ContainsKey(file))
searchScopesPerFile[file] = new List<IFindReferenceSearchScope>(); searchScopesPerFile[file] = new List<IFindReferenceSearchScope>();
searchScopesPerFile[file].Add(thisSearchScope); searchScopesPerFile[file].Add(thisSearchScope);
workAmount++;
} }
interestingFileNames[i] = interestingFiles.ToList();
workAmount += interestingFiles.Count;
} }
workAmountInverse = 1.0 / workAmount; workAmountInverse = 1.0 / workAmount;
} }

Loading…
Cancel
Save