summaryrefslogtreecommitdiff
path: root/src/expr/attribute.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-10-02 23:53:18 +0000
committerMorgan Deters <mdeters@gmail.com>2010-10-02 23:53:18 +0000
commit036a23f59bbc23343dc690fd1e147541e79e9b9e (patch)
tree697cac1b21e1826b7798b69dce7f4480a26e8f77 /src/expr/attribute.h
parent999b496fbf50525b7245ee28e972d7f0f04a1025 (diff)
revert a workaround fix to CDMap that was committed as part of the arith-indexed-vars merge, and fix the root cause (maybe?) in attribute.cpp: previously, items from the cdnodes attribute table weren't properly being "obliterated" from the table due to a typo
Diffstat (limited to 'src/expr/attribute.h')
-rw-r--r--src/expr/attribute.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/expr/attribute.h b/src/expr/attribute.h
index 2ef34a771..0668c5f8f 100644
--- a/src/expr/attribute.h
+++ b/src/expr/attribute.h
@@ -90,6 +90,9 @@ class AttributeManager {
void deleteFromTable(AttrHash<T>& table, NodeValue* nv);
template <class T>
+ void deleteFromTable(CDAttrHash<T>& table, NodeValue* nv);
+
+ template <class T>
void deleteAllFromTable(AttrHash<T>& table);
/**
@@ -554,6 +557,17 @@ inline void AttributeManager::deleteFromTable(AttrHash<T>& table,
}
/**
+ * Obliterate a NodeValue from a (context-dependent) attribute table.
+ */
+template <class T>
+inline void AttributeManager::deleteFromTable(CDAttrHash<T>& table,
+ NodeValue* nv) {
+ for(unsigned id = 0; id < attr::LastAttributeId<T, true>::s_id; ++id) {
+ table.obliterate(std::make_pair(id, nv));
+ }
+}
+
+/**
* Remove all attributes from the table calling the cleanup function if one is defined.
*/
template <class T>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback