diff options
author | Sergey Prigogin | 2013-11-28 00:25:07 +0000 |
---|---|---|
committer | Sergey Prigogin | 2013-11-28 00:25:07 +0000 |
commit | a205557db0e935640e7834d9d5d5f9b5827419ba (patch) | |
tree | fa4d206c0deb8c2ca1dc346ac52a9780c9469cae | |
parent | a45fabad98a0f65e73244485430ea6738ad808ee (diff) | |
download | org.eclipse.cdt-a205557db0e935640e7834d9d5d5f9b5827419ba.tar.gz org.eclipse.cdt-a205557db0e935640e7834d9d5d5f9b5827419ba.tar.xz org.eclipse.cdt-a205557db0e935640e7834d9d5d5f9b5827419ba.zip |
Cosmetics.
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java index 088bd9e752f..fef4ac72ad2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2012 IBM Corporation and others. + * Copyright (c) 2004, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -72,7 +72,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt private static final int FULLY_RESOLVED = 1; private static final int RESOLUTION_IN_PROGRESS = 1 << 1; - private int bits = 0; + private int bits; public CPPFunction(IASTDeclarator declarator) { if (declarator != null) { @@ -99,7 +99,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt } else if (declarations != null) { tu = declarations[0].getTranslationUnit(); } else { - //implicit binding + // Implicit binding IScope scope = getScope(); IASTNode node = ASTInternal.getPhysicalNodeOfScope(scope); if (node != null) { @@ -464,22 +464,25 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt do { if (dtor != null) { IASTNode parent = dtor.getParent(); - while (!(parent instanceof IASTDeclaration)) + while (!(parent instanceof IASTDeclaration)) { parent = parent.getParent(); + } IASTDeclSpecifier declSpec = null; - if (parent instanceof IASTSimpleDeclaration) + if (parent instanceof IASTSimpleDeclaration) { declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier(); - else if (parent instanceof IASTFunctionDefinition) + } else if (parent instanceof IASTFunctionDefinition) { declSpec = ((IASTFunctionDefinition)parent).getDeclSpecifier(); + } if (declSpec != null && declSpec.isInline()) return true; } - if (ds != null && ++i < ds.length) + if (ds != null && ++i < ds.length) { dtor = ds[i]; - else + } else { break; + } } while (dtor != null); return false; } |