mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
simplify insert interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33567 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32f3bd43db
commit
bcabbfc310
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user