mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed: UDMF user value lists need to be sorted for binary search to work but weren't.
This commit is contained in:
parent
b308a7df52
commit
823f75e592
2 changed files with 6 additions and 0 deletions
|
@ -309,6 +309,11 @@ void FUDMFKeys::Sort()
|
|||
|
||||
FUDMFKey *FUDMFKeys::Find(FName key)
|
||||
{
|
||||
if (!mSorted)
|
||||
{
|
||||
mSorted = true;
|
||||
Sort();
|
||||
}
|
||||
int min = 0, max = Size()-1;
|
||||
|
||||
while (min <= max)
|
||||
|
|
|
@ -220,6 +220,7 @@ struct FUDMFKey
|
|||
|
||||
class FUDMFKeys : public TArray<FUDMFKey>
|
||||
{
|
||||
bool mSorted = false;
|
||||
public:
|
||||
void Sort();
|
||||
FUDMFKey *Find(FName key);
|
||||
|
|
Loading…
Reference in a new issue