mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Deferred typeid reference list creation until absolutely necessary.
This commit is contained in:
parent
57bc1229ab
commit
ef4eaa9e09
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,7 @@ public class ASTTypeId implements IASTTypeId
|
||||||
private final String typeName;
|
private final String typeName;
|
||||||
private final List pointerOps;
|
private final List pointerOps;
|
||||||
private final Type kind;
|
private final Type kind;
|
||||||
private List references = new ArrayList();
|
private List references = null;
|
||||||
private ISymbol symbol;
|
private ISymbol symbol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -218,6 +218,8 @@ public class ASTTypeId implements IASTTypeId
|
||||||
*/
|
*/
|
||||||
public void addReferences(List list, ReferenceCache cache)
|
public void addReferences(List list, ReferenceCache cache)
|
||||||
{
|
{
|
||||||
|
if( references == null )
|
||||||
|
references = new ArrayList( list.size() );
|
||||||
for( int i = 0; i < list.size(); ++i )
|
for( int i = 0; i < list.size(); ++i )
|
||||||
references.add( list.get(i) );
|
references.add( list.get(i) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue