Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/xlc
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:53:35 +0000
commit8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (patch)
tree311bce2a3fbe500e879b44c270b0d2ee24fe01af /xlc
parent8985c7b63f04ad139e8b93160798e642d2addc55 (diff)
downloadorg.eclipse.cdt-8844a8f9f22802fedffa3cb2a8a21b041aa64b74.tar.gz
org.eclipse.cdt-8844a8f9f22802fedffa3cb2a8a21b041aa64b74.tar.xz
org.eclipse.cdt-8844a8f9f22802fedffa3cb2a8a21b041aa64b74.zip
Bug 540373: Cleanup: Remove unnecessary casts
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove unnecessary casts and completing the wizard Change-Id: I287d4066b12fc19d7f73a016e11c9405abb4ceb9
Diffstat (limited to 'xlc')
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java4
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java4
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java6
3 files changed, 7 insertions, 7 deletions
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
index b886f2f2b4c..72b62e87b0d 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
@@ -169,7 +169,7 @@ public class XlcCParser extends PrsStream
}
public PrsStream getParseStream() {
- return (PrsStream) this;
+ return this;
}
//
@@ -200,7 +200,7 @@ public class XlcCParser extends PrsStream
public void parser(Monitor monitor, int error_repair_count) {
try {
- btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ btParser = new FixedBacktrackingParser(monitor, this, prs, this);
} catch (NotBacktrackParseTableException e) {
throw new Error(
new NotBacktrackParseTableException("Regenerate XlcCParserprs.java with -BACKTRACK option"));
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
index bdd9032c9ed..4d05f69e37d 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
@@ -171,7 +171,7 @@ public class XlcCPPParser extends PrsStream
}
public PrsStream getParseStream() {
- return (PrsStream) this;
+ return this;
}
//
@@ -202,7 +202,7 @@ public class XlcCPPParser extends PrsStream
public void parser(Monitor monitor, int error_repair_count) {
try {
- btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ btParser = new FixedBacktrackingParser(monitor, this, prs, this);
} catch (NotBacktrackParseTableException e) {
throw new Error(
new NotBacktrackParseTableException("Regenerate XlcCPPParserprs.java with -BACKTRACK option"));
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
index 8e55e62e63e..c44882f9b42 100644
--- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
+++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
@@ -82,7 +82,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
addField(fPathEditor);
- IProject project = ((IResource) (getElement().getAdapter(IResource.class))).getProject();
+ IProject project = (getElement().getAdapter(IResource.class)).getProject();
String currentPath = null;
@@ -106,7 +106,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
protected void createVersionEditor() {
- IProject project = ((IResource) (getElement().getAdapter(IResource.class))).getProject();
+ IProject project = (getElement().getAdapter(IResource.class)).getProject();
String[] versionEntries = { PreferenceConstants.P_XL_COMPILER_VERSION_8_NAME,
PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, PreferenceConstants.P_XL_COMPILER_VERSION_10_NAME,
PreferenceConstants.P_XL_COMPILER_VERSION_11_NAME };
@@ -181,7 +181,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
public boolean performOk() {
// store the value in the owner text field
try {
- IProject project = ((IResource) (getElement().getAdapter(IResource.class))).getProject();
+ IProject project = (getElement().getAdapter(IResource.class)).getProject();
if (fPathEditor != null) {
project.setPersistentProperty(new QualifiedName("", //$NON-NLS-1$

Back to the top