diff options
author | Sergey Prigogin | 2013-05-22 17:22:38 +0000 |
---|---|---|
committer | Sergey Prigogin | 2013-05-22 17:22:38 +0000 |
commit | 724e1991ac0ec15dd187cc85abf2309c92a0d104 (patch) | |
tree | 06293c244a51a74b4cad31f95c23562f714627fc /codan/org.eclipse.cdt.codan.checkers | |
parent | 20e43a27447564e83d9fd9ccbc44df1197cdd2d8 (diff) | |
download | org.eclipse.cdt-724e1991ac0ec15dd187cc85abf2309c92a0d104.tar.gz org.eclipse.cdt-724e1991ac0ec15dd187cc85abf2309c92a0d104.tar.xz org.eclipse.cdt-724e1991ac0ec15dd187cc85abf2309c92a0d104.zip |
Cosmetics.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.checkers')
-rw-r--r-- | codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java index b7d2f619873..8c7b66fa67c 100644 --- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java +++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Anton Gorenkov and others + * Copyright (c) 2011, 2013 Anton Gorenkov 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 @@ -249,7 +249,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker { } /** Checks that specified declaration is a class constructor - * (it is a class member and its name is equal to class name) + * (it is a class member and its name is equal to the class name) */ private ICPPConstructor getConstructor(IASTDeclaration decl) { if (decl instanceof ICPPASTFunctionDefinition) { @@ -270,10 +270,11 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker { if (memberName != null) { IBinding memberBinding = memberName.resolveBinding(); ICPPClassType classType = null; - if (memberBinding instanceof ICPPClassType) + if (memberBinding instanceof ICPPClassType) { classType = (ICPPClassType) memberBinding; - else if (memberBinding instanceof ICPPConstructor) + } else if (memberBinding instanceof ICPPConstructor) { classType = ((ICPPConstructor) memberBinding).getClassOwner(); + } if (classType != null && classType.isSameType(constructor.getClassOwner())) return null; } |