Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-04-13 19:41:01 -0400
committerSergey Prigogin2012-04-13 19:41:01 -0400
commit03021e3af29d7b3f97c50d6a6f69b246dff25b03 (patch)
treed5c03ec499c3e6952d74a8ebe44de23d822e2ad6
parentae7dc29df93774dff806a2f8f80b43d02c8adc6d (diff)
downloadorg.eclipse.cdt-03021e3af29d7b3f97c50d6a6f69b246dff25b03.tar.gz
org.eclipse.cdt-03021e3af29d7b3f97c50d6a6f69b246dff25b03.tar.xz
org.eclipse.cdt-03021e3af29d7b3f97c50d6a6f69b246dff25b03.zip
Cosmetics.
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java12
1 files changed, 4 insertions, 8 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 546b2fef33..421a601dc9 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
@@ -53,7 +53,6 @@ import org.eclipse.cdt.internal.core.pdom.dom.PDOMName;
* of methods that are working with their value.
*
* @author Anton Gorenkov
- *
*/
public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
public static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization"; //$NON-NLS-1$
@@ -65,7 +64,6 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
}
class OnEachClass extends ASTVisitor {
-
// NOTE: Classes can be nested and even can be declared in constructors of the other classes
private final Stack< Set<IField> > constructorsStack = new Stack< Set<IField> >();
private boolean skipConstructorsWithFCalls = skipConstructorsWithFCalls();
@@ -133,9 +131,9 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
}
// Bug 368420 - Skip constructor if pattern is *this = toBeCopied;
- if(expression instanceof IASTBinaryExpression) {
+ if (expression instanceof IASTBinaryExpression) {
IASTBinaryExpression binaryExpression = (IASTBinaryExpression) expression;
- if(referencesThis(binaryExpression.getOperand1()) && binaryExpression.getOperand1().isLValue()) {
+ if (referencesThis(binaryExpression.getOperand1()) && binaryExpression.getOperand1().isLValue()) {
skipCurrentConstructor = true;
}
}
@@ -146,8 +144,8 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
return PROCESS_CONTINUE;
}
- /** Checks whether expression references this (directly, by pointer or by reference)
- *
+ /**
+ * Checks whether expression references this (directly, by pointer or by reference)
*/
public boolean referencesThis(IASTNode expr) {
if (expr instanceof IASTLiteralExpression) {
@@ -224,7 +222,6 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
return null;
}
-
}
@Override
@@ -236,5 +233,4 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
public boolean skipConstructorsWithFCalls() {
return (Boolean) getPreference(getProblemById(ER_ID, getFile()), PARAM_SKIP);
}
-
}

Back to the top