mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
- fixd bad comparators for std::sort
This commit is contained in:
parent
7589dfda25
commit
9a919960c9
1 changed files with 5 additions and 5 deletions
|
@ -625,7 +625,7 @@ SortNode * GLDrawList::SortSpriteList(SortNode * head)
|
|||
for(count=0,n=head;n;n=n->next) sortspritelist.Push(n);
|
||||
std::sort(sortspritelist.begin(), sortspritelist.end(), [=](SortNode *a, SortNode *b)
|
||||
{
|
||||
return CompareSprites(a, b);
|
||||
return CompareSprites(a, b) < 0;
|
||||
});
|
||||
|
||||
for(i=0;i<sortspritelist.Size();i++)
|
||||
|
@ -906,13 +906,13 @@ void GLDrawList::SortWalls()
|
|||
{
|
||||
if (drawitems.Size() > 1)
|
||||
{
|
||||
std::sort(drawitems.begin(), drawitems.end(), [=](const GLDrawItem &a, const GLDrawItem &b) -> int
|
||||
std::sort(drawitems.begin(), drawitems.end(), [=](const GLDrawItem &a, const GLDrawItem &b) -> bool
|
||||
{
|
||||
GLWall * w1 = &walls[a.index];
|
||||
GLWall * w2 = &walls[b.index];
|
||||
|
||||
if (w1->gltexture != w2->gltexture) return w1->gltexture - w2->gltexture;
|
||||
return ((w1->flags & 3) - (w2->flags & 3));
|
||||
if (w1->gltexture != w2->gltexture) return w1->gltexture < w2->gltexture;
|
||||
return (w1->flags & 3) < (w2->flags & 3);
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -926,7 +926,7 @@ void GLDrawList::SortFlats()
|
|||
{
|
||||
GLFlat * w1 = &flats[a.index];
|
||||
GLFlat* w2 = &flats[b.index];
|
||||
return w1->gltexture - w2->gltexture;
|
||||
return w1->gltexture < w2->gltexture;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue