From ab6e2bd18c270febffdab1db6307f7f4b8c5d4ea Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Wed, 12 Nov 2008 09:47:27 +0000 Subject: [PATCH] Fix warning. --- .../extractfunction/ExtractFunctionRefactoring.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java index 46bd6d3e469..42d712c0aa0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java @@ -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);