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

Cosmetics.

This commit is contained in:
Sergey Prigogin 2014-10-27 17:34:48 -07:00
parent 27f00a30d8
commit e437230f58
2 changed files with 8 additions and 9 deletions

View file

@ -40,7 +40,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
private ICPPASTInitializerClause operand2; private ICPPASTInitializerClause operand2;
private ICPPEvaluation evaluation; private ICPPEvaluation evaluation;
private IASTImplicitName[] implicitNames = null; private IASTImplicitName[] implicitNames;
public CPPASTBinaryExpression() { public CPPASTBinaryExpression() {
} }
@ -58,10 +58,9 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
@Override @Override
public CPPASTBinaryExpression copy(CopyStyle style) { public CPPASTBinaryExpression copy(CopyStyle style) {
CPPASTBinaryExpression copy = new CPPASTBinaryExpression(); CPPASTBinaryExpression copy = new CPPASTBinaryExpression(op,
copy.op = op; operand1 == null ? null : operand1.copy(style),
copy.setOperand1(operand1 == null ? null : operand1.copy(style)); operand2 == null ? null : operand2.copy(style));
copy.setInitOperand2(operand2 == null ? null : operand2.copy(style));
return copy(copy, style); return copy(copy, style);
} }

View file

@ -72,7 +72,7 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
if (((ASTNode) expression).getOffset() < minOffset) if (((ASTNode) expression).getOffset() < minOffset)
break; break;
// Setup the ast to use the alternative // Setup the AST to use the alternative.
owner.replace(nodeToReplace, expression); owner.replace(nodeToReplace, expression);
nodeToReplace= resolveNestedAmbiguities(expression, resolver); nodeToReplace= resolveNestedAmbiguities(expression, resolver);
@ -84,7 +84,7 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
} }
} }
// Adjust the operator sequence // Adjust the operator sequence.
if (selected != null) { if (selected != null) {
minOffset= selected.getRightOffset(); minOffset= selected.getRightOffset();
BinaryOperator targetOp = selected.getTargetOperator(); BinaryOperator targetOp = selected.getTargetOperator();
@ -141,7 +141,7 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
@Override @Override
public IASTNode[] getNodes() { public IASTNode[] getNodes() {
if (fNodes == null) { if (fNodes == null) {
List<IASTNode> nl= new ArrayList<IASTNode>(); List<IASTNode> nl= new ArrayList<>();
BinaryOperator op= fEndOperator; BinaryOperator op= fEndOperator;
while (op != null) { while (op != null) {
nl.add(op.getExpression()); nl.add(op.getExpression());