mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code streamlining.
This commit is contained in:
parent
48e9d6efea
commit
224b4ef3a3
2 changed files with 7 additions and 13 deletions
|
@ -14,7 +14,10 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
|||
|
||||
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
|
||||
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE;
|
||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.*;
|
||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.glvalueType;
|
||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.prvalueType;
|
||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.typeFromFunctionCall;
|
||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.valueCategoryFromFunctionCall;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
|
||||
|
@ -44,7 +47,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
|||
private IASTInitializerClause operand2;
|
||||
private IType type;
|
||||
private ICPPFunction overload= UNINITIALIZED_FUNCTION;
|
||||
private IASTImplicitName[] implicitNames = null;
|
||||
private IASTImplicitName[] implicitNames;
|
||||
|
||||
public CPPASTBinaryExpression() {
|
||||
}
|
||||
|
@ -66,11 +69,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
|||
copy.op = op;
|
||||
copy.setOperand1(operand1 == null ? null : operand1.copy(style));
|
||||
copy.setInitOperand2(operand2 == null ? null : operand2.copy(style));
|
||||
copy.setOffsetAndLength(this);
|
||||
if (style == CopyStyle.withLocations) {
|
||||
copy.setCopyLocation(this);
|
||||
}
|
||||
return copy;
|
||||
return copy(copy, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -100,7 +100,7 @@ public class ExtractLocalVariableRefactoring extends CRefactoring {
|
|||
@Override
|
||||
public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
|
||||
throws CoreException, OperationCanceledException {
|
||||
SubMonitor sm = SubMonitor.convert(pm, 9);
|
||||
SubMonitor sm = SubMonitor.convert(pm, 10);
|
||||
|
||||
RefactoringStatus status = super.checkInitialConditions(sm.newChild(6));
|
||||
if (status.hasError()) {
|
||||
|
@ -128,11 +128,6 @@ public class ExtractLocalVariableRefactoring extends CRefactoring {
|
|||
if (isProgressMonitorCanceled(sm, initStatus))
|
||||
return initStatus;
|
||||
|
||||
sm.worked(1);
|
||||
|
||||
container.getNames(); //XXX Is this needed?
|
||||
sm.worked(1);
|
||||
|
||||
info.addNamesToUsedNames(findAllDeclaredNames());
|
||||
sm.worked(1);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue