diff options
author | Sergey Prigogin | 2012-04-10 21:19:12 +0000 |
---|---|---|
committer | Sergey Prigogin | 2012-04-10 22:25:47 +0000 |
commit | e726c3d2179ad8a92a78b0794c6224dca55acc11 (patch) | |
tree | f7c74780c5ffb1588b750cb782be1c9c775461a4 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java | |
parent | 595db0a239d44fe1f1590c846fb4edcd1e4f0609 (diff) | |
download | org.eclipse.cdt-e726c3d2179ad8a92a78b0794c6224dca55acc11.tar.gz org.eclipse.cdt-e726c3d2179ad8a92a78b0794c6224dca55acc11.tar.xz org.eclipse.cdt-e726c3d2179ad8a92a78b0794c6224dca55acc11.zip |
Cosmetics.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java index 0dc03ab7a29..4d5c9f4a0cb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPFunction.java @@ -6,9 +6,9 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Doug Schaefer (QNX) - Initial API and implementation - * IBM Corporation - * Markus Schorn (Wind River Systems) + * Doug Schaefer (QNX) - Initial API and implementation + * IBM Corporation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom.cpp; @@ -37,7 +37,6 @@ import org.eclipse.core.runtime.CoreException; * Binding for c++ functions in the index. */ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverloader { - private static final short ANNOT_PARAMETER_PACK = 8; private static final short ANNOT_IS_DELETED = 9; @@ -70,8 +69,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl protected static final int EXCEPTION_SPEC = SIGNATURE_HASH + 4; // int /** - * Offset of annotation information (relative to the beginning of the - * record). + * Offset of annotation information (relative to the beginning of the record). */ private static final int ANNOTATION = EXCEPTION_SPEC + Database.PTR_SIZE; // short @@ -102,10 +100,10 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl private short getAnnotation(ICPPFunction function) { int annot= PDOMCPPAnnotation.encodeAnnotation(function) & 0xff; if (function.hasParameterPack()) { - annot |= (1<<ANNOT_PARAMETER_PACK); + annot |= (1 << ANNOT_PARAMETER_PACK); } if (function.isDeleted()) { - annot |= (1<<ANNOT_IS_DELETED); + annot |= (1 << ANNOT_IS_DELETED); } return (short) annot; } @@ -134,7 +132,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl newBindingRequiredArgCount= func.getRequiredArgumentCount(); fType= null; - linkage.storeType(record+FUNCTION_TYPE, newType); + linkage.storeType(record + FUNCTION_TYPE, newType); PDOMCPPParameter oldParams= getFirstParameter(null); int requiredCount; @@ -167,7 +165,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl db.putInt(record + REQUIRED_ARG_COUNT, requiredCount); fRequiredArgCount= requiredCount; - long oldRec = db.getRecPtr(record+EXCEPTION_SPEC); + long oldRec = db.getRecPtr(record + EXCEPTION_SPEC); storeExceptionSpec(extractExceptionSpec(func)); if (oldRec != 0) { PDOMCPPTypeList.clearTypes(this, oldRec); @@ -183,7 +181,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl IType[] extractExceptionSpec(ICPPFunction binding) { IType[] exceptionSpec; if (binding instanceof ICPPMethod && ((ICPPMethod) binding).isImplicit()) { - // don't store the exception specification, compute it on demand. + // Don't store the exception specification, compute it on demand. exceptionSpec= null; } else { exceptionSpec= binding.getExceptionSpecification(); @@ -197,7 +195,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl db.putInt(record + NUM_PARAMS, params.length); db.putRecPtr(record + FIRST_PARAM, 0); PDOMCPPParameter next= null; - for (int i= params.length-1; i >= 0; --i) { + for (int i= params.length; --i >= 0;) { next= new PDOMCPPParameter(linkage, this, params[i], next); } db.putRecPtr(record + FIRST_PARAM, next == null ? 0 : next.getRecord()); @@ -205,7 +203,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl private void setType(ICPPFunctionType ft) throws CoreException { fType= null; - getLinkage().storeType(record+FUNCTION_TYPE, ft); + getLinkage().storeType(record + FUNCTION_TYPE, ft); } @Override @@ -241,7 +239,6 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl return getBit(getAnnotation(), PDOMCAnnotation.INLINE_OFFSET); } - @Override public int getRequiredArgumentCount() { if (fRequiredArgCount == -1) { @@ -309,7 +306,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl public final ICPPFunctionType getType() { if (fType == null) { try { - fType= (ICPPFunctionType) getLinkage().loadType(record+FUNCTION_TYPE); + fType= (ICPPFunctionType) getLinkage().loadType(record + FUNCTION_TYPE); } catch (CoreException e) { CCorePlugin.log(e); fType= new ProblemFunctionType(ISemanticProblem.TYPE_NOT_PERSISTED); @@ -385,7 +382,7 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl @Override public IType[] getExceptionSpecification() { try { - final long rec = getPDOM().getDB().getRecPtr(record+EXCEPTION_SPEC); + final long rec = getPDOM().getDB().getRecPtr(record + EXCEPTION_SPEC); return PDOMCPPTypeList.getTypes(this, rec); } catch (CoreException e) { CCorePlugin.log(e); |