mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Remove an old hack from my menu system that upon closer inspection is no longer needed.
git-svn-id: https://svn.eduke32.com/eduke32@6186 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a10893d75f
commit
b0d9e94004
1 changed files with 7 additions and 1 deletions
|
@ -3836,7 +3836,13 @@ static vec2_t Menu_TextSize(int32_t x, int32_t y, const MenuFont_t *font, const
|
|||
static int32_t Menu_FindOptionBinarySearch(MenuOption_t *object, const int32_t query, size_t searchstart, size_t searchend)
|
||||
{
|
||||
const size_t thissearch = (searchstart + searchend) / 2;
|
||||
const int32_t difference = ((object->options->optionValues == NULL && query < 0) ? object->options->numOptions-1 : query) - ((object->options->optionValues == NULL) ? (int32_t) thissearch : object->options->optionValues[thissearch]);
|
||||
const bool isIdentityMap = object->options->optionValues == NULL;
|
||||
|
||||
const int32_t destination = isIdentityMap ? (int32_t) thissearch : object->options->optionValues[thissearch];
|
||||
|
||||
const int32_t difference = query - destination;
|
||||
|
||||
Bassert(!isIdentityMap || query >= 0);
|
||||
|
||||
if (difference == 0)
|
||||
return thissearch;
|
||||
|
|
Loading…
Reference in a new issue