1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 02:36: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; import org.eclipse.core.runtime.PlatformObject;
public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAlias, ICPPInternalBinding { public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAlias, ICPPInternalBinding {
private ICPPNamespace namespace; private ICPPNamespace namespace;
private IASTName alias; private IASTName alias;
@ -58,24 +57,24 @@ public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAl
@Override @Override
public String[] getQualifiedName() { public String[] getQualifiedName() {
return CPPVisitor.getQualifiedName( this ); return CPPVisitor.getQualifiedName(this);
} }
@Override @Override
public char[][] getQualifiedNameCharArray() { public char[][] getQualifiedNameCharArray() {
return CPPVisitor.getQualifiedNameCharArray( this ); return CPPVisitor.getQualifiedNameCharArray(this);
} }
@Override @Override
public IScope getScope() { public IScope getScope() {
return CPPVisitor.getContainingScope( alias ); return CPPVisitor.getContainingScope(alias);
} }
@Override @Override
public boolean isGloballyQualified() throws DOMException { public boolean isGloballyQualified() throws DOMException {
IScope scope = getScope(); IScope scope = getScope();
while( scope != null ){ while (scope != null) {
if( scope instanceof ICPPBlockScope ) if (scope instanceof ICPPBlockScope)
return false; return false;
scope = scope.getParent(); scope = scope.getParent();
} }

View file

@ -52,8 +52,7 @@ class PDOMCPPNamespaceAlias extends PDOMCPPBinding implements ICPPNamespaceAlias
private void setTargetBinding(PDOMLinkage linkage, IBinding target) throws CoreException { private void setTargetBinding(PDOMLinkage linkage, IBinding target) throws CoreException {
PDOMBinding namespace = getLinkage().adaptBinding(target); PDOMBinding namespace = getLinkage().adaptBinding(target);
getDB().putRecPtr(record + NAMESPACE_BINDING, getDB().putRecPtr(record + NAMESPACE_BINDING, namespace != null ? namespace.getRecord() : 0);
namespace != null ? namespace.getRecord() : 0);
} }
@Override @Override