projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32f3bd4
)
simplify insert interface
author
Chris Lattner
<sabre@nondot.org>
Sat, 27 Jan 2007 02:13:58 +0000
(
02:13
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 27 Jan 2007 02:13:58 +0000
(
02:13
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33567
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SmallSet.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallSet.h
b/include/llvm/ADT/SmallSet.h
index f0481fcef335aef5e6e7ca5f25510bd8a77ae95a..ef1470501abe92d7090b8c5a2aad2e5a60639ae0 100644
(file)
--- 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) {