mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*Core: Fixed Tuple, Fixed RemoveSorted
git-svn-id: svn://ultimatepp.org/upp/trunk@3720 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0954a5af1a
commit
ef3f742d21
2 changed files with 6 additions and 9 deletions
|
|
@ -595,10 +595,7 @@ C& RemoveSorted(C& from, const C& what, const L& less)
|
|||
return from;
|
||||
typename C::Iterator fp = from.Begin() + BinFindIndex(from, *wp), fe = from.End(), fd = fp;
|
||||
if(fp == fe)
|
||||
{
|
||||
from.Clear();
|
||||
return from;
|
||||
}
|
||||
for(;;)
|
||||
{
|
||||
while(less(*fp, *wp))
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ struct Tuple2 {
|
|||
int Compare(const Tuple2& x) const { return CombineCompare(a, x.a)(b, x.b); }
|
||||
bool operator<=(const Tuple2& x) const { return Compare(x) <= 0; }
|
||||
bool operator>=(const Tuple2& x) const { return Compare(x) >= 0; }
|
||||
bool operator<(const Tuple2& x) const { return Compare(x) != 0; }
|
||||
bool operator>(const Tuple2& x) const { return Compare(x) != 0; }
|
||||
bool operator<(const Tuple2& x) const { return Compare(x) < 0; }
|
||||
bool operator>(const Tuple2& x) const { return Compare(x) > 0; }
|
||||
|
||||
unsigned GetHashValue() const { return CombineHash(a, b); }
|
||||
|
||||
|
|
@ -45,8 +45,8 @@ struct Tuple3 {
|
|||
int Compare(const Tuple3& x) const { return CombineCompare(a, x.a)(b, x.b)(c, x.c); }
|
||||
bool operator<=(const Tuple3& x) const { return Compare(x) <= 0; }
|
||||
bool operator>=(const Tuple3& x) const { return Compare(x) >= 0; }
|
||||
bool operator<(const Tuple3& x) const { return Compare(x) != 0; }
|
||||
bool operator>(const Tuple3& x) const { return Compare(x) != 0; }
|
||||
bool operator<(const Tuple3& x) const { return Compare(x) < 0; }
|
||||
bool operator>(const Tuple3& x) const { return Compare(x) > 0; }
|
||||
|
||||
unsigned GetHashValue() const { return CombineHash(a, b, c); }
|
||||
|
||||
|
|
@ -84,8 +84,8 @@ struct Tuple4 {
|
|||
int Compare(const Tuple4& x) const { return CombineCompare(a, x.a)(b, x.b)(c, x.c)(d, x.d); }
|
||||
bool operator<=(const Tuple4& x) const { return Compare(x) <= 0; }
|
||||
bool operator>=(const Tuple4& x) const { return Compare(x) >= 0; }
|
||||
bool operator<(const Tuple4& x) const { return Compare(x) != 0; }
|
||||
bool operator>(const Tuple4& x) const { return Compare(x) != 0; }
|
||||
bool operator<(const Tuple4& x) const { return Compare(x) < 0; }
|
||||
bool operator>(const Tuple4& x) const { return Compare(x) > 0; }
|
||||
|
||||
unsigned GetHashValue() const { return CombineHash(a, b, c, d); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue