mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
Code formatting.
This commit is contained in:
parent
ae80725f3f
commit
7bf06f5e35
1 changed files with 13 additions and 13 deletions
|
@ -24,25 +24,24 @@ import org.eclipse.cdt.internal.core.index.IIndexType;
|
||||||
/**
|
/**
|
||||||
* @author aniefer
|
* @author aniefer
|
||||||
*/
|
*/
|
||||||
public class GPPPointerToMemberType extends CPPPointerToMemberType implements
|
public class GPPPointerToMemberType extends CPPPointerToMemberType implements IGPPPointerToMemberType {
|
||||||
IGPPPointerToMemberType {
|
private boolean isRestrict;
|
||||||
|
|
||||||
private boolean isRestrict = false;
|
|
||||||
/**
|
/**
|
||||||
* @param type
|
* @param type
|
||||||
* @param operator
|
* @param operator
|
||||||
*/
|
*/
|
||||||
public GPPPointerToMemberType( IType type, IGPPASTPointerToMember operator ) {
|
public GPPPointerToMemberType(IType type, IGPPASTPointerToMember operator) {
|
||||||
super( type, operator );
|
super(type, operator);
|
||||||
this.isRestrict = operator.isRestrict();
|
this.isRestrict = operator.isRestrict();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IType stripQualifiers(){
|
public IType stripQualifiers() {
|
||||||
GPPPointerToMemberType result = (GPPPointerToMemberType) super.stripQualifiers();
|
GPPPointerToMemberType result = (GPPPointerToMemberType) super.stripQualifiers();
|
||||||
|
|
||||||
if( isRestrict ){
|
if (isRestrict) {
|
||||||
if( result == this ){
|
if (result == this) {
|
||||||
result = (GPPPointerToMemberType) clone();
|
result = (GPPPointerToMemberType) clone();
|
||||||
result.isRestrict = false;
|
result.isRestrict = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -51,6 +50,7 @@ public class GPPPointerToMemberType extends CPPPointerToMemberType implements
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPPointerType#isRestrict()
|
* @see org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPPointerType#isRestrict()
|
||||||
*/
|
*/
|
||||||
|
@ -59,16 +59,16 @@ public class GPPPointerToMemberType extends CPPPointerToMemberType implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSameType( IType o ){
|
public boolean isSameType(IType o) {
|
||||||
if (o==this) {
|
if (o == this) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (o instanceof ITypedef || o instanceof IIndexType) {
|
if (o instanceof ITypedef || o instanceof IIndexType) {
|
||||||
return o.isSameType(this);
|
return o.isSameType(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !super.isSameType( o ) ) return false;
|
if (!super.isSameType(o)) return false;
|
||||||
if( o instanceof IGPPPointerToMemberType ){
|
if (o instanceof IGPPPointerToMemberType) {
|
||||||
return (isRestrict == ((IGPPPointerToMemberType) o).isRestrict());
|
return (isRestrict == ((IGPPPointerToMemberType) o).isRestrict());
|
||||||
}
|
}
|
||||||
return (isRestrict == false);
|
return (isRestrict == false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue