1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 01:05:38 +02:00

Removed unnecessary casts.

Change-Id: Id100ea3e2382598a666cb5596dafe70149aaf6f0
This commit is contained in:
Sergey Prigogin 2017-01-27 16:25:22 -08:00
parent d941a275b4
commit 19d8c2a741
2 changed files with 4 additions and 4 deletions

View file

@ -284,11 +284,11 @@ public final class CompositeValue implements IValue {
} }
public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException {
ICPPEvaluation evaluation = (ICPPEvaluation) buf.unmarshalEvaluation(); ICPPEvaluation evaluation = buf.unmarshalEvaluation();
int len = buf.getInt(); int len = buf.getInt();
ICPPEvaluation values[] = new ICPPEvaluation[len]; ICPPEvaluation values[] = new ICPPEvaluation[len];
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
values[i] = (ICPPEvaluation) buf.unmarshalEvaluation(); values[i] = buf.unmarshalEvaluation();
} }
return new CompositeValue(evaluation, values); return new CompositeValue(evaluation, values);
} }

View file

@ -74,8 +74,8 @@ public class DependentValue implements IValue {
public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException {
ICPPEvaluation eval= buf.unmarshalEvaluation(); ICPPEvaluation eval= buf.unmarshalEvaluation();
if (eval instanceof ICPPEvaluation) if (eval != null)
return new DependentValue((ICPPEvaluation) eval); return new DependentValue(eval);
return IntegralValue.UNKNOWN; return IntegralValue.UNKNOWN;
} }