diff --git a/src/keysections.cpp b/src/keysections.cpp index 94c5510020..fc0e668bae 100644 --- a/src/keysections.cpp +++ b/src/keysections.cpp @@ -80,9 +80,9 @@ void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection, siz { for (unsigned i=0; imItems[i]->CheckCoordinate(x, y)) { - if (i != mDesc->mSelectedItem) + if (i != static_cast (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;imItems.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 (mDesc->mSelectedItem) == i); } if (mDesc->mSelectedItem >= 0 && mDesc->mSelectedItem < (int)mDesc->mItems.Size()) mDesc->mItems[mDesc->mSelectedItem]->DrawSelector(mDesc->mSelectOfsX, mDesc->mSelectOfsY, mDesc->mSelector); diff --git a/src/menu/loadsavemenu.cpp b/src/menu/loadsavemenu.cpp index cb73c25868..8a07976bf2 100644 --- a/src/menu/loadsavemenu.cpp +++ b/src/menu/loadsavemenu.cpp @@ -604,7 +604,7 @@ void DLoadSaveMenu::Drawer () { color = CR_ORANGE; } - else if (j == Selected) + else if (j == static_cast (Selected)) { color = CR_WHITE; } @@ -612,7 +612,7 @@ void DLoadSaveMenu::Drawer () { color = CR_TAN; } - if (j == Selected) + if (j == static_cast (Selected)) { screen->Clear (listboxLeft, listboxTop+rowHeight*i, listboxRight, listboxTop+rowHeight*(i+1), -1, diff --git a/src/menu/optionmenu.cpp b/src/menu/optionmenu.cpp index ff13d4b24e..988e87e373 100644 --- a/src/menu/optionmenu.cpp +++ b/src/menu/optionmenu.cpp @@ -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 (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 (mDesc->mSelectedItem) == i); + if (cur_indent >= 0 && static_cast (mDesc->mSelectedItem) == i && mDesc->mItems[i]->Selectable()) { if (((DMenu::MenuTime%8) < 6) || DMenu::CurrentMenu != this) { diff --git a/src/menu/playermenu.cpp b/src/menu/playermenu.cpp index 8a5d085073..2bf6ae97f3 100644 --- a/src/menu/playermenu.cpp +++ b/src/menu/playermenu.cpp @@ -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 (players[consoleplayer].userinfo.skin) == i) { sel = j; } diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 7283c4abdc..772cdc3a70 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -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 (i) == mResponses[response]) { char tbuf[16]; diff --git a/src/p_spec.cpp b/src/p_spec.cpp index 2e3f1b6e2b..be2c4163d1 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -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 (line - lines)); } return true; } diff --git a/src/statistics.cpp b/src/statistics.cpp index f12a458dc0..f5778af445 100644 --- a/src/statistics.cpp +++ b/src/statistics.cpp @@ -595,7 +595,7 @@ FString GetStatString() CCMD(printstats) { StoreLevelStats(); // Refresh the current level's results. - Printf("%s", GetStatString()); + Printf("%s", GetStatString().GetChars()); } diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 0c0a54499e..76a2dd6121 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -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();