1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-05-15 16:42:53 -07:00
parent 90ec4a7886
commit e56469e20d
2 changed files with 9 additions and 8 deletions

View file

@ -31,7 +31,8 @@ public class CPPFunctionTemplateSpecialization extends CPPFunctionSpecialization
implements ICPPFunctionTemplate, ICPPInternalTemplate { implements ICPPFunctionTemplate, ICPPInternalTemplate {
private ObjectMap instances; private ObjectMap instances;
public CPPFunctionTemplateSpecialization(ICPPFunction original, ICPPClassType owner, ICPPTemplateParameterMap argumentMap, ICPPFunctionType type, IType[] exceptionSpecs) { public CPPFunctionTemplateSpecialization(ICPPFunction original, ICPPClassType owner,
ICPPTemplateParameterMap argumentMap, ICPPFunctionType type, IType[] exceptionSpecs) {
super(original, owner, argumentMap, type, exceptionSpecs); super(original, owner, argumentMap, type, exceptionSpecs);
} }
@ -62,7 +63,7 @@ public class CPPFunctionTemplateSpecialization extends CPPFunctionSpecialization
public synchronized ICPPTemplateInstance[] getAllInstances() { public synchronized ICPPTemplateInstance[] getAllInstances() {
if (instances != null) { if (instances != null) {
ICPPTemplateInstance[] result= new ICPPTemplateInstance[instances.size()]; ICPPTemplateInstance[] result= new ICPPTemplateInstance[instances.size()];
for (int i=0; i < instances.size(); i++) { for (int i= 0; i < instances.size(); i++) {
result[i]= (ICPPTemplateInstance) instances.getAt(i); result[i]= (ICPPTemplateInstance) instances.getAt(i);
} }
return result; return result;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Andrew Niefer (IBM) - Initial API and implementation * Andrew Niefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -31,9 +31,9 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.core.runtime.PlatformObject; import org.eclipse.core.runtime.PlatformObject;
/** /**
* Base class for all specializations in the AST. Note the specialization may also be created on behalf * Base class for all specializations in the AST. Note the specialization may also be created on
* of the index. The index may be concurrently be accessed (read-only) from different threads. So there * behalf of the index. The index may be concurrently be accessed (read-only) from different
* is a need to synchronize non-final members. * threads. So there is a need to synchronize non-final members.
*/ */
public abstract class CPPSpecialization extends PlatformObject implements ICPPSpecialization, ICPPInternalBinding { public abstract class CPPSpecialization extends PlatformObject implements ICPPSpecialization, ICPPInternalBinding {
private final IBinding owner; private final IBinding owner;
@ -73,7 +73,7 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
if (declarations == null) { if (declarations == null) {
declarations = new IASTNode[] { node }; declarations = new IASTNode[] { node };
} else { } else {
// keep the lowest offset declaration in [0] // Keep the lowest offset declaration in [0]
if (declarations.length > 0 && if (declarations.length > 0 &&
((ASTNode) node).getOffset() < ((ASTNode) declarations[0]).getOffset()) { ((ASTNode) node).getOffset() < ((ASTNode) declarations[0]).getOffset()) {
declarations = ArrayUtil.prepend(IASTNode.class, declarations, node); declarations = ArrayUtil.prepend(IASTNode.class, declarations, node);