1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2014-08-19 16:25:40 -07:00
parent 3a81f65932
commit 5e4ab381c6
2 changed files with 7 additions and 9 deletions

View file

@ -26,7 +26,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.core.runtime.PlatformObject;
public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAlias, ICPPInternalBinding {
private ICPPNamespace namespace;
private IASTName alias;
@ -58,24 +57,24 @@ public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAl
@Override
public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName( this );
return CPPVisitor.getQualifiedName(this);
}
@Override
public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray( this );
return CPPVisitor.getQualifiedNameCharArray(this);
}
@Override
public IScope getScope() {
return CPPVisitor.getContainingScope( alias );
return CPPVisitor.getContainingScope(alias);
}
@Override
public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope();
while( scope != null ){
if( scope instanceof ICPPBlockScope )
while (scope != null) {
if (scope instanceof ICPPBlockScope)
return false;
scope = scope.getParent();
}

View file

@ -32,7 +32,7 @@ class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + Database.PTR_SIZE;
public PDOMCPPNamespaceAlias(PDOMLinkage linkage, PDOMNode parent, ICPPNamespaceAlias alias)
throws CoreException {
throws CoreException {
super(linkage, parent, alias.getNameCharArray());
setTargetBinding(parent.getLinkage(), alias.getBinding());
}
@ -52,8 +52,7 @@ class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias
private void setTargetBinding(PDOMLinkage linkage, IBinding target) throws CoreException {
PDOMBinding namespace = getLinkage().adaptBinding(target);
getDB().putRecPtr(record + NAMESPACE_BINDING,
namespace != null ? namespace.getRecord() : 0);
getDB().putRecPtr(record + NAMESPACE_BINDING, namespace != null ? namespace.getRecord() : 0);
}
@Override