mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Minor code simplification.
This commit is contained in:
parent
26acd7fa6a
commit
71d5459a41
1 changed files with 8 additions and 9 deletions
|
@ -640,23 +640,22 @@ public class PDOMFile implements IIndexFragmentFile {
|
|||
return result.toArray(new IIndexName[result.size()]);
|
||||
}
|
||||
|
||||
public static PDOMFile findFile(PDOMLinkage linkage, BTree btree, IIndexFileLocation location, IIndexLocationConverter strategy)
|
||||
throws CoreException {
|
||||
public static PDOMFile findFile(PDOMLinkage linkage, BTree btree, IIndexFileLocation location,
|
||||
IIndexLocationConverter strategy) throws CoreException {
|
||||
String internalRepresentation= strategy.toInternalFormat(location);
|
||||
long record= 0;
|
||||
if (internalRepresentation != null) {
|
||||
Finder finder = new Finder(linkage.getDB(), internalRepresentation, linkage.getLinkageID());
|
||||
btree.accept(finder);
|
||||
record= finder.getRecord();
|
||||
}
|
||||
if (record != 0) {
|
||||
return new PDOMFile(linkage, record);
|
||||
long record= finder.getRecord();
|
||||
if (record != 0) {
|
||||
return new PDOMFile(linkage, record);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static IIndexFragmentFile[] findFiles(PDOM pdom, BTree btree, IIndexFileLocation location, IIndexLocationConverter strategy)
|
||||
throws CoreException {
|
||||
public static IIndexFragmentFile[] findFiles(PDOM pdom, BTree btree, IIndexFileLocation location,
|
||||
IIndexLocationConverter strategy) throws CoreException {
|
||||
String internalRepresentation= strategy.toInternalFormat(location);
|
||||
if (internalRepresentation != null) {
|
||||
Finder finder = new Finder(pdom.getDB(), internalRepresentation, -1);
|
||||
|
|
Loading…
Add table
Reference in a new issue