summaryrefslogtreecommitdiff
path: root/src/expr/attribute.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-02-24 21:08:15 +0000
committerTim King <taking@cs.nyu.edu>2010-02-24 21:08:15 +0000
commit3bc3eae0d3e36870b30636bd1e3eb52683e0dc17 (patch)
treee83352315485d8f08857276049969fc842fa2e93 /src/expr/attribute.h
parent4c1cb16059e6e484581873dfb3103851183ccc72 (diff)
Committing small changes to attribute, and theory to avoid future merge problems for Moragn. Also cleaned up theory uf and ecdata, and updated both to reflect attribute. Should be close now.
Diffstat (limited to 'src/expr/attribute.h')
-rw-r--r--src/expr/attribute.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/expr/attribute.h b/src/expr/attribute.h
index 95433688e..5620d7795 100644
--- a/src/expr/attribute.h
+++ b/src/expr/attribute.h
@@ -86,10 +86,10 @@ struct KindValueToTableValueMapping<bool> {
template <class T>
struct KindValueToTableValueMapping<T*> {
typedef void* table_value_type;
- inline static void* convert(const T*& t) {
- return reinterpret_cast<void*>(t);
+ inline static void* convert(const T* const& t) {
+ return reinterpret_cast<void*>(const_cast<T*>(t));
}
- inline static T* convertBack(void*& t) {
+ inline static T* convertBack(void* const& t) {
return reinterpret_cast<T*>(t);
}
};
@@ -455,6 +455,17 @@ struct getTable<const T*> {
}
};
+template <class T>
+struct getTable<T*> {
+ typedef AttrHash<void*> table_type;
+ static inline table_type& get(AttributeManager& am) {
+ return am.d_ptrs;
+ }
+ static inline const table_type& get(const AttributeManager& am) {
+ return am.d_ptrs;
+ }
+};
+
// ATTRIBUTE MANAGER IMPLEMENTATIONS ===========================================
template <class AttrKind>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback