Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2016-10-23 06:15:20 +0000
committerNathan Ridge2016-10-23 06:15:20 +0000
commitd459bad87227a81a29641d5a3c8e615c72eb5f87 (patch)
tree125e3ee1926705b5451cc5c31dfb5351f6d872e2
parente9c6ca09e842b2f2fbc3f91398eea1e57a7e21f0 (diff)
downloadorg.eclipse.cdt-d459bad87227a81a29641d5a3c8e615c72eb5f87.tar.gz
org.eclipse.cdt-d459bad87227a81a29641d5a3c8e615c72eb5f87.tar.xz
org.eclipse.cdt-d459bad87227a81a29641d5a3c8e615c72eb5f87.zip
Follow-up to the DependentValue refactoring
Replace some uses of IntegralValue with DependentValue that were missed originally. Change-Id: Ieac5757c042378082c8d38f4883d7e495f64d208
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DependentValue.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java3
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);
}
/**

Back to the top