1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00

Patch for David Daoust.

Fixes BaseScanner#fileCache.
This commit is contained in:
John Camelon 2005-02-02 15:32:02 +00:00
parent 33390e2e03
commit 3615ece8be

View file

@ -2738,7 +2738,8 @@ abstract class BaseScanner implements IScanner {
private CodeReader createReader(String path, String fileName) private CodeReader createReader(String path, String fileName)
{ {
String finalPath = ScannerUtility.createReconciledPath(path, fileName); String finalPath = ScannerUtility.createReconciledPath(path, fileName);
CodeReader reader = (CodeReader) fileCache.get(finalPath.toCharArray()); char [] finalPathc = finalPath.toCharArray();
CodeReader reader = (CodeReader) fileCache.get(finalPathc);
if (reader != null) if (reader != null)
return reader; // found the file in the cache return reader; // found the file in the cache
@ -2748,8 +2749,9 @@ abstract class BaseScanner implements IScanner {
return null; // the file was not found return null; // the file was not found
if (reader.filename != null) if (reader.filename != null)
fileCache.put(reader.filename, reader); // put the full requested path in the cache -- it is more likely
// to match next time than the reader.filename
fileCache.put(finalPathc, reader);
return reader; return reader;
} }