mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Simplify
This commit is contained in:
parent
cc02001836
commit
e4d3cdca09
@ -169,11 +169,10 @@ void CList::selectIndex(int which)
|
||||
|
||||
void CList::selectNext()
|
||||
{
|
||||
int index = getSelectedIndex();
|
||||
if (index < 0 || index+1 >= list->size())
|
||||
selectIndex(0);
|
||||
else
|
||||
selectIndex(index+1);
|
||||
int index = getSelectedIndex() + 1;
|
||||
if (index >= list->size())
|
||||
index = 0;
|
||||
selectIndex(index);
|
||||
}
|
||||
|
||||
void CList::selectPrev()
|
||||
|
Loading…
Reference in New Issue
Block a user