- Am I the only one who thinks that static_casts can create really clunky code? (Thanks, GCC, for your overly paranoid warning settings that necessitate such ugliness. :( )
SVN r2844 (trunk)
This commit is contained in:
parent
15d74dab56
commit
16fa8cc249
7 changed files with 18 additions and 15 deletions
|
|
@ -218,7 +218,7 @@ bool DListMenu::MouseEvent(int type, int x, int y)
|
|||
{
|
||||
if (mDesc->mItems[i]->CheckCoordinate(x, y))
|
||||
{
|
||||
if (i != static_cast<unsigned int> (mDesc->mSelectedItem))
|
||||
if ((int)i != mDesc->mSelectedItem)
|
||||
{
|
||||
//S_Sound (CHAN_VOICE | CHAN_UI, "menu/cursor", snd_menuvolume, ATTN_NONE);
|
||||
}
|
||||
|
|
@ -258,7 +258,7 @@ void DListMenu::Drawer ()
|
|||
{
|
||||
for(unsigned i=0;i<mDesc->mItems.Size(); i++)
|
||||
{
|
||||
if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(static_cast<unsigned int> (mDesc->mSelectedItem) == i);
|
||||
if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(mDesc->mSelectedItem == (int)i);
|
||||
}
|
||||
if (mDesc->mSelectedItem >= 0 && mDesc->mSelectedItem < (int)mDesc->mItems.Size())
|
||||
mDesc->mItems[mDesc->mSelectedItem]->DrawSelector(mDesc->mSelectOfsX, mDesc->mSelectOfsY, mDesc->mSelector);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue