1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-03-01 23:24:05 +00:00
parent a38e6e30f5
commit eaabdd84c8
2 changed files with 17 additions and 20 deletions

View file

@ -26,7 +26,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
/** /**
* Cast expression for c++ * Cast expression for C++
*/ */
public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpression, IASTAmbiguityParent { public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpression, IASTAmbiguityParent {
private int op; private int op;
@ -54,7 +54,6 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
return copy; return copy;
} }
public void setTypeId(IASTTypeId typeId) { public void setTypeId(IASTTypeId typeId) {
assertNotFrozen(); assertNotFrozen();
this.typeId = typeId; this.typeId = typeId;
@ -100,9 +99,9 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
} }
} }
if( typeId != null ) if( !typeId.accept( action ) ) return false; if (typeId != null && !typeId.accept(action)) return false;
IASTExpression op = getOperand(); IASTExpression op = getOperand();
if( op != null ) if( !op.accept( action ) ) return false; if (op != null && !op.accept(action)) return false;
if (action.shouldVisitExpressions) { if (action.shouldVisitExpressions) {
switch (action.leave(this)) { switch (action.leave(this)) {
@ -141,6 +140,4 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
public boolean isLValue() { public boolean isLValue() {
return getValueCategory() == LVALUE; return getValueCategory() == LVALUE;
} }
} }