[llvm-commits] CVS: llvm/include/llvm/ADT/SmallSet.h
Chris Lattner
sabre at nondot.org
Fri Jan 26 18:14:14 PST 2007
Changes in directory llvm/include/llvm/ADT:
SmallSet.h updated: 1.3 -> 1.4
---
Log message:
simplify insert interface
---
Diffs of the changes: (+3 -3)
SmallSet.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/ADT/SmallSet.h
diff -u llvm/include/llvm/ADT/SmallSet.h:1.3 llvm/include/llvm/ADT/SmallSet.h:1.4
--- llvm/include/llvm/ADT/SmallSet.h:1.3 Mon Jan 22 22:59:58 2007
+++ llvm/include/llvm/ADT/SmallSet.h Fri Jan 26 20:13:58 2007
@@ -55,12 +55,12 @@
}
/// insert - Insert an element into the set if it isn't already there.
- std::pair<iterator,bool> insert(const T &V) {
+ bool insert(const T &V) {
iterator I = find(V);
if (I != end()) // Don't reinsert if it already exists.
- return std::make_pair(I, false);
+ return false;
Vector.push_back(V);
- return std::make_pair(end()-1, true);
+ return true;
}
void erase(const T &V) {
More information about the llvm-commits
mailing list