From d459bad87227a81a29641d5a3c8e615c72eb5f87 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 23 Oct 2016 02:15:20 -0400 Subject: [PATCH] Follow-up to the DependentValue refactoring Replace some uses of IntegralValue with DependentValue that were missed originally. Change-Id: Ieac5757c042378082c8d38f4883d7e495f64d208 --- .../eclipse/cdt/internal/core/dom/parser/DependentValue.java | 4 ++-- .../eclipse/cdt/internal/core/dom/parser/ValueFactory.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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 70dcc1618a3..3874cb9bcd1 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 @@ -86,10 +86,10 @@ public class DependentValue implements IValue { @Override public boolean equals(Object obj) { - if (!(obj instanceof IntegralValue)) { + if (!(obj instanceof DependentValue)) { return false; } - final IntegralValue rhs = (IntegralValue) obj; + final DependentValue rhs = (DependentValue) obj; return CharArrayUtils.equals(getSignature(), rhs.getSignature()); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java index fd8a0b28a61..672970714e2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java @@ -581,7 +581,8 @@ public class ValueFactory { } private static boolean isDeferredValue(IValue value) { - return value instanceof IntegralValue && ((IntegralValue) value).numberValue() == null; + return value instanceof DependentValue || + (value instanceof IntegralValue && ((IntegralValue) value).numberValue() == null); } /**