mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
201e1243dd
commit
1e1afcf3ce
2 changed files with 7 additions and 8 deletions
|
@ -19,7 +19,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of ICPPUnaryTypeTransformation.
|
* Implementation of ICPPUnaryTypeTransformation.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation, ISerializableType {
|
public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation, ISerializableType {
|
||||||
Operator fOperator;
|
Operator fOperator;
|
||||||
|
@ -65,9 +64,10 @@ public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation,
|
||||||
|
|
||||||
public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
|
||||||
int operator = buffer.getByte();
|
int operator = buffer.getByte();
|
||||||
if (operator >= Operator.values().length)
|
if (operator >= Operator.values().length) {
|
||||||
throw new CoreException(CCorePlugin.createStatus(
|
throw new CoreException(CCorePlugin.createStatus(
|
||||||
"Cannot unmarshal CPPUnaryTypeTransformation - unrecognized type transformation operator")); //$NON-NLS-1$
|
"Cannot unmarshal CPPUnaryTypeTransformation - unrecognized type transformation operator")); //$NON-NLS-1$
|
||||||
|
}
|
||||||
return new CPPUnaryTypeTransformation(Operator.values()[operator], buffer.unmarshalType());
|
return new CPPUnaryTypeTransformation(Operator.values()[operator], buffer.unmarshalType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,8 +62,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
||||||
linkage.new ConfigurePartialSpecialization(this, partial);
|
linkage.new ConfigurePartialSpecialization(this, partial);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PDOMCPPClassTemplatePartialSpecialization(PDOMLinkage linkage,
|
public PDOMCPPClassTemplatePartialSpecialization(PDOMLinkage linkage, long bindingRecord) {
|
||||||
long bindingRecord) {
|
|
||||||
super(linkage, bindingRecord);
|
super(linkage, bindingRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,15 +132,15 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
||||||
@Override
|
@Override
|
||||||
public int pdomCompareTo(PDOMBinding other) {
|
public int pdomCompareTo(PDOMBinding other) {
|
||||||
int cmp = super.pdomCompareTo(other);
|
int cmp = super.pdomCompareTo(other);
|
||||||
if(cmp == 0) {
|
if (cmp == 0) {
|
||||||
if(other instanceof PDOMCPPClassTemplatePartialSpecialization) {
|
if (other instanceof PDOMCPPClassTemplatePartialSpecialization) {
|
||||||
try {
|
try {
|
||||||
PDOMCPPClassTemplatePartialSpecialization otherSpec = (PDOMCPPClassTemplatePartialSpecialization) other;
|
PDOMCPPClassTemplatePartialSpecialization otherSpec = (PDOMCPPClassTemplatePartialSpecialization) other;
|
||||||
int mySM = getSignatureHash();
|
int mySM = getSignatureHash();
|
||||||
int otherSM = otherSpec.getSignatureHash();
|
int otherSM = otherSpec.getSignatureHash();
|
||||||
return mySM == otherSM ? 0 : mySM < otherSM ? -1 : 1;
|
return mySM == otherSM ? 0 : mySM < otherSM ? -1 : 1;
|
||||||
} catch(CoreException ce) {
|
} catch (CoreException e) {
|
||||||
CCorePlugin.log(ce);
|
CCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
assert false;
|
assert false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue