aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-27 02:13:58 +0000
committerChris Lattner <sabre@nondot.org>2007-01-27 02:13:58 +0000
commitbcabbfc310bfd3cd87836f7967d1d71713d91a1d (patch)
tree4bbb8dabf056aa13e669055392ee90348a35fd22
parent32f3bd43dbf4082ed05478c6ef69727925ab1646 (diff)
simplify insert interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33567 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/SmallSet.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h
index f0481fcef3..ef1470501a 100644
--- a/include/llvm/ADT/SmallSet.h
+++ b/include/llvm/ADT/SmallSet.h
@@ -55,12 +55,12 @@ public:
}
/// 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) {