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

Fix warning.

This commit is contained in:
Markus Schorn 2008-11-12 09:47:27 +00:00
parent 9bf64fd0e5
commit ab6e2bd18c

View file

@ -105,6 +105,8 @@ import org.eclipse.cdt.internal.ui.refactoring.utils.SelectionHelper;
public class ExtractFunctionRefactoring extends CRefactoring {
static final Integer NULL_INTEGER = Integer.valueOf(0);
static final char[] ZERO= "0".toCharArray(); //$NON-NLS-1$
NodeContainer container;
final ExtractFunctionInformation info;
@ -323,7 +325,7 @@ public class ExtractFunctionRefactoring extends CRefactoring {
IASTExpression leftSubTree = parent.getOperand1();
int op = parent.getOperator();
IASTBinaryExpression newParentNode = new CPPASTBinaryExpression();
CPPASTLiteralExpression placeholder = new CPPASTLiteralExpression(IASTLiteralExpression.lk_integer_constant, "0"); //$NON-NLS-1$
CPPASTLiteralExpression placeholder = new CPPASTLiteralExpression(IASTLiteralExpression.lk_integer_constant, ZERO);
IASTBinaryExpression rootBinExp = getRootBinExp(parent, list);
newParentNode.setParent(rootBinExp.getParent());
newParentNode.setOperand1(placeholder);