mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Delete dead code.
It was added 12 years ago, but never used (and in the case of sort, never implemented). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3bd14877eb
commit
16c0d7e5f8
@ -579,60 +579,6 @@ public:
|
||||
void splice(iterator where, iplist &L2, iterator first, iterator last) {
|
||||
if (first != last) transfer(where, L2, first, last);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===
|
||||
// High-Level Functionality that shouldn't really be here, but is part of list
|
||||
//
|
||||
|
||||
// These two functions are actually called remove/remove_if in list<>, but
|
||||
// they actually do the job of erase, rename them accordingly.
|
||||
//
|
||||
void erase(const NodeTy &val) {
|
||||
for (iterator I = begin(), E = end(); I != E; ) {
|
||||
iterator next = I; ++next;
|
||||
if (*I == val) erase(I);
|
||||
I = next;
|
||||
}
|
||||
}
|
||||
template<class Pr1> void erase_if(Pr1 pred) {
|
||||
for (iterator I = begin(), E = end(); I != E; ) {
|
||||
iterator next = I; ++next;
|
||||
if (pred(*I)) erase(I);
|
||||
I = next;
|
||||
}
|
||||
}
|
||||
|
||||
template<class Pr2> void unique(Pr2 pred) {
|
||||
if (empty()) return;
|
||||
for (iterator I = begin(), E = end(), Next = begin(); ++Next != E;) {
|
||||
if (pred(*I))
|
||||
erase(Next);
|
||||
else
|
||||
I = Next;
|
||||
Next = I;
|
||||
}
|
||||
}
|
||||
void unique() { unique(op_equal); }
|
||||
|
||||
template<class Pr3> void merge(iplist &right, Pr3 pred) {
|
||||
iterator first1 = begin(), last1 = end();
|
||||
iterator first2 = right.begin(), last2 = right.end();
|
||||
while (first1 != last1 && first2 != last2)
|
||||
if (pred(*first2, *first1)) {
|
||||
iterator next = first2;
|
||||
transfer(first1, right, first2, ++next);
|
||||
first2 = next;
|
||||
} else {
|
||||
++first1;
|
||||
}
|
||||
if (first2 != last2) transfer(last1, right, first2, last2);
|
||||
}
|
||||
void merge(iplist &right) { return merge(right, op_less); }
|
||||
|
||||
template<class Pr3> void sort(Pr3 pred);
|
||||
void sort() { sort(op_less); }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user