1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-15 20:25:46 +02:00

Minor optimization.

This commit is contained in:
Sergey Prigogin 2016-03-28 13:52:24 -07:00
parent b1f7f7f7f1
commit eeaed8ee74

View file

@ -93,14 +93,15 @@ abstract public class CPPScope implements ICPPASTInternalScope {
if (!name.isActive()) if (!name.isActive())
return; return;
if (bindings == null)
bindings = new CharArrayObjectMap<>(1);
if (name instanceof ICPPASTQualifiedName && if (name instanceof ICPPASTQualifiedName &&
!(physicalNode instanceof ICPPASTCompositeTypeSpecifier) && !(physicalNode instanceof ICPPASTCompositeTypeSpecifier) &&
!(physicalNode instanceof ICPPASTNamespaceDefinition)) { !(physicalNode instanceof ICPPASTNamespaceDefinition)) {
return; return;
} }
if (bindings == null)
bindings = new CharArrayObjectMap<>(1);
final char[] c= name.getLookupKey(); final char[] c= name.getLookupKey();
if (c.length == 0) if (c.length == 0)
return; return;