diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-07-07 05:39:04 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-07-07 05:39:04 +0000 |
commit | 327b4bf823a8077930bdc9bf4ae7903087ee06ba (patch) | |
tree | 5c3571fc5ef12730cb6d3b818330dc5de5b6b33d /src/context/cdset.h | |
parent | a9448e3e4d8e371bd74b55b9a98b61beab8e00f7 (diff) |
minor changes to cdmap/cdset interface for detection of duplicate inserts
Diffstat (limited to 'src/context/cdset.h')
-rw-r--r-- | src/context/cdset.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/context/cdset.h b/src/context/cdset.h index 40d504cad..7032f76ba 100644 --- a/src/context/cdset.h +++ b/src/context/cdset.h @@ -22,6 +22,7 @@ #define __CVC4__CONTEXT__CDSET_H #include "context/context.h" +#include "context/cdmap.h" #include "util/Assert.h" namespace CVC4 { @@ -45,8 +46,12 @@ public: return super::count(v); } - void insert(const V& v) { - super::insert(v, v); + bool insert(const V& v) { + return super::insert(v, v); + } + + bool contains(const V& v) { + return find(v) != end(); } // FIXME: no erase(), too much hassle to implement efficiently... |