From 19d8c2a7418faf7b14074a91ae33d3fda6aaa875 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Fri, 27 Jan 2017 16:25:22 -0800 Subject: [PATCH] Removed unnecessary casts. Change-Id: Id100ea3e2382598a666cb5596dafe70149aaf6f0 --- .../eclipse/cdt/internal/core/dom/parser/CompositeValue.java | 4 ++-- .../eclipse/cdt/internal/core/dom/parser/DependentValue.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java index 3bb2101f05f..8842ae1fa8e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java @@ -284,11 +284,11 @@ public final class CompositeValue implements IValue { } public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { - ICPPEvaluation evaluation = (ICPPEvaluation) buf.unmarshalEvaluation(); + ICPPEvaluation evaluation = buf.unmarshalEvaluation(); int len = buf.getInt(); ICPPEvaluation values[] = new ICPPEvaluation[len]; for (int i = 0; i < len; i++) { - values[i] = (ICPPEvaluation) buf.unmarshalEvaluation(); + values[i] = buf.unmarshalEvaluation(); } return new CompositeValue(evaluation, values); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java index 836ace90d70..4bb3730b3a3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java @@ -74,8 +74,8 @@ public class DependentValue implements IValue { public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { ICPPEvaluation eval= buf.unmarshalEvaluation(); - if (eval instanceof ICPPEvaluation) - return new DependentValue((ICPPEvaluation) eval); + if (eval != null) + return new DependentValue(eval); return IntegralValue.UNKNOWN; }