[llvm-commits] CVS: llvm/include/llvm/ADT/SetVector.h
Reid Spencer
reid at x10sys.com
Tue Jan 16 18:22:37 PST 2007
Changes in directory llvm/include/llvm/ADT:
SetVector.h updated: 1.10 -> 1.11
---
Log message:
For PR1094: http://llvm.org/PR1094 :
Make the SetVector::iterator be the vector's const_iterator.
---
Diffs of the changes: (+3 -2)
SetVector.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/include/llvm/ADT/SetVector.h
diff -u llvm/include/llvm/ADT/SetVector.h:1.10 llvm/include/llvm/ADT/SetVector.h:1.11
--- llvm/include/llvm/ADT/SetVector.h:1.10 Thu Apr 21 15:13:50 2005
+++ llvm/include/llvm/ADT/SetVector.h Tue Jan 16 20:22:18 2007
@@ -37,7 +37,7 @@
typedef const T& const_reference;
typedef std::set<value_type> set_type;
typedef std::vector<value_type> vector_type;
- typedef typename vector_type::iterator iterator;
+ typedef typename vector_type::const_iterator iterator;
typedef typename vector_type::const_iterator const_iterator;
typedef typename vector_type::size_type size_type;
@@ -112,7 +112,8 @@
/// @brief Remove an item from the set vector.
void remove(const value_type& X) {
if (0 < set_.erase(X)) {
- iterator I = std::find(vector_.begin(),vector_.end(),X);
+ typename vector_type::iterator I =
+ std::find(vector_.begin(), vector_.end(), X);
assert(I != vector_.end() && "Corrupted SetVector instances!");
vector_.erase(I);
}
More information about the llvm-commits
mailing list