mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Cosmetics.
This commit is contained in:
parent
27f00a30d8
commit
e437230f58
2 changed files with 8 additions and 9 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
|
||||||
for (BranchPoint v= fVariants; v != null; v= v.getNext()) {
|
for (BranchPoint v= fVariants; v != null; v= v.getNext()) {
|
||||||
Variant selected= null;
|
Variant selected= null;
|
||||||
int bestCount= 0;
|
int bestCount= 0;
|
||||||
for (Variant q= v.getFirstVariant(); q != null ; q=q.getNext()) {
|
for (Variant q= v.getFirstVariant(); q != null ; q= q.getNext()) {
|
||||||
final IASTName[] templateNames = q.getTemplateNames();
|
final IASTName[] templateNames = q.getTemplateNames();
|
||||||
if (templateNames.length > bestCount) {
|
if (templateNames.length > bestCount) {
|
||||||
// Don't check branch-points inside of a selected variant.
|
// Don't check branch-points inside of a selected variant.
|
||||||
|
@ -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());
|
||||||
|
|
Loading…
Add table
Reference in a new issue