1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-10-01 11:50:14 -07:00
parent 51ac942b6c
commit 411734ee3b

View file

@ -22,7 +22,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
import org.eclipse.cdt.internal.core.pdom.dom.c.PDOMCAnnotation;
class PDOMCPPAnnotation {
// "Mutable" shares the same offset as "inline" because
// only fields can be mutable and only functions can be inline.
public static final int MUTABLE_OFFSET = PDOMCAnnotation.INLINE_OFFSET;
@ -42,7 +41,7 @@ class PDOMCPPAnnotation {
public static final int OVERRIDE_OFFSET = 5;
public static final int FINAL_OFFSET = 6;
public static final int MAX_EXTRA_OFFSET= FINAL_OFFSET;
/**
* Encodes storage class specifiers and other annotation, including
* C++-specific annotation, from an IBinding as a bit vector.
@ -62,14 +61,12 @@ class PDOMCPPAnnotation {
ICPPField variable = (ICPPField) binding;
modifiers |= (variable.isMutable() ? 1 : 0) << MUTABLE_OFFSET;
}
}
else {
} else {
if (binding instanceof ICPPFunction) {
if (((ICPPFunction) binding).isExternC()) {
modifiers |= 1 << EXTERN_C_OFFSET;
}
}
if (binding instanceof ICPPVariable) {
} else if (binding instanceof ICPPVariable) {
if (((ICPPVariable) binding).isExternC()) {
modifiers |= 1 << EXTERN_C_OFFSET;
}