mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Fixed: GCC warnings.
SVN r2843 (trunk)
This commit is contained in:
parent
1e83634089
commit
15d74dab56
9 changed files with 16 additions and 15 deletions
|
@ -80,9 +80,9 @@ void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection, siz
|
|||
{
|
||||
for (unsigned i=0; i<KeySections.Size(); i++)
|
||||
{
|
||||
mysnprintf (subsection, sublen, "%s.Bindings", KeySections[i].mSection);
|
||||
mysnprintf (subsection, sublen, "%s.Bindings", KeySections[i].mSection.GetChars());
|
||||
DoSaveKeys (config, section, &KeySections[i], false);
|
||||
mysnprintf (subsection, sublen, "%s.DoubleBindings", KeySections[i].mSection);
|
||||
mysnprintf (subsection, sublen, "%s.DoubleBindings", KeySections[i].mSection.GetChars());
|
||||
DoSaveKeys (config, section, &KeySections[i], true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ bool DListMenu::MouseEvent(int type, int x, int y)
|
|||
{
|
||||
if (mDesc->mItems[i]->CheckCoordinate(x, y))
|
||||
{
|
||||
if (i != mDesc->mSelectedItem)
|
||||
if (i != static_cast<unsigned int> (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(mDesc->mSelectedItem == i);
|
||||
if (mDesc->mItems[i]->mEnabled) mDesc->mItems[i]->Drawer(static_cast<unsigned int> (mDesc->mSelectedItem) == i);
|
||||
}
|
||||
if (mDesc->mSelectedItem >= 0 && mDesc->mSelectedItem < (int)mDesc->mItems.Size())
|
||||
mDesc->mItems[mDesc->mSelectedItem]->DrawSelector(mDesc->mSelectOfsX, mDesc->mSelectOfsY, mDesc->mSelector);
|
||||
|
|
|
@ -604,7 +604,7 @@ void DLoadSaveMenu::Drawer ()
|
|||
{
|
||||
color = CR_ORANGE;
|
||||
}
|
||||
else if (j == Selected)
|
||||
else if (j == static_cast<unsigned int> (Selected))
|
||||
{
|
||||
color = CR_WHITE;
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ void DLoadSaveMenu::Drawer ()
|
|||
{
|
||||
color = CR_TAN;
|
||||
}
|
||||
if (j == Selected)
|
||||
if (j == static_cast<unsigned int> (Selected))
|
||||
{
|
||||
screen->Clear (listboxLeft, listboxTop+rowHeight*i,
|
||||
listboxRight, listboxTop+rowHeight*(i+1), -1,
|
||||
|
|
|
@ -392,13 +392,13 @@ void DOptionMenu::Drawer ()
|
|||
for (i = 0; i < mDesc->mItems.Size() && y <= lastrow; i++, y += fontheight)
|
||||
{
|
||||
// Don't scroll the uppermost items
|
||||
if (i == mDesc->mScrollTop)
|
||||
if (i == static_cast<unsigned int> (mDesc->mScrollTop))
|
||||
{
|
||||
i += mDesc->mScrollPos;
|
||||
if (i >= mDesc->mItems.Size()) break; // skipped beyond end of menu
|
||||
}
|
||||
int cur_indent = mDesc->mItems[i]->Draw(mDesc, y, indent, mDesc->mSelectedItem == i);
|
||||
if (cur_indent >= 0 && mDesc->mSelectedItem == i && mDesc->mItems[i]->Selectable())
|
||||
int cur_indent = mDesc->mItems[i]->Draw(mDesc, y, indent, static_cast<unsigned int> (mDesc->mSelectedItem) == i);
|
||||
if (cur_indent >= 0 && static_cast<unsigned int> (mDesc->mSelectedItem) == i && mDesc->mItems[i]->Selectable())
|
||||
{
|
||||
if (((DMenu::MenuTime%8) < 6) || DMenu::CurrentMenu != this)
|
||||
{
|
||||
|
|
|
@ -802,7 +802,7 @@ void DPlayerMenu::UpdateSkins()
|
|||
{
|
||||
int j = PlayerSkins.Push(i);
|
||||
li->SetString(j, skins[i].name);
|
||||
if (players[consoleplayer].userinfo.skin == i)
|
||||
if (static_cast<unsigned int> (players[consoleplayer].userinfo.skin) == i)
|
||||
{
|
||||
sel = j;
|
||||
}
|
||||
|
|
|
@ -1031,7 +1031,7 @@ public:
|
|||
|
||||
screen->DrawText (SmallFont, CR_GREEN, x, y, mResponseLines[i], DTA_Clean, true, TAG_DONE);
|
||||
|
||||
if (i == mResponses[response])
|
||||
if (static_cast<unsigned int> (i) == mResponses[response])
|
||||
{
|
||||
char tbuf[16];
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
|||
// end of changed code
|
||||
if (developer && buttonSuccess)
|
||||
{
|
||||
Printf ("Line special %d activated on line %i\n", special, line - lines);
|
||||
Printf ("Line special %d activated on line %i\n", special, static_cast<int> (line - lines));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -595,7 +595,7 @@ FString GetStatString()
|
|||
CCMD(printstats)
|
||||
{
|
||||
StoreLevelStats(); // Refresh the current level's results.
|
||||
Printf("%s", GetStatString());
|
||||
Printf("%s", GetStatString().GetChars());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1200,6 +1200,7 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
|||
bMultiPatch = true;
|
||||
sc.SetCMode(true);
|
||||
sc.MustGetString();
|
||||
const char* textureName = NULL;
|
||||
if (sc.Compare("optional"))
|
||||
{
|
||||
bSilent = true;
|
||||
|
@ -1208,11 +1209,11 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
|||
{
|
||||
// this is not right. Apparently a texture named 'optional' is being defined right now...
|
||||
sc.UnGet();
|
||||
sc.String = "optional";
|
||||
textureName = "optional";
|
||||
bSilent = false;
|
||||
}
|
||||
}
|
||||
uppercopy(Name, sc.String);
|
||||
uppercopy(Name, !textureName ? sc.String : textureName);
|
||||
Name[8] = 0;
|
||||
sc.MustGetStringName(",");
|
||||
sc.MustGetNumber();
|
||||
|
|
Loading…
Reference in a new issue