mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-30 15:34:33 +00:00
More GCC Ubuntu warnings
This commit is contained in:
parent
f39ba9783a
commit
eb81cc7908
4 changed files with 25 additions and 10 deletions
|
|
@ -158,6 +158,7 @@ namespace MWGui
|
|||
switch (id)
|
||||
{
|
||||
case GM_Name:
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mNameDialog));
|
||||
mNameDialog = std::make_unique<TextInputDialog>();
|
||||
mNameDialog->setTextLabel(
|
||||
|
|
@ -167,8 +168,9 @@ namespace MWGui
|
|||
mNameDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onNameDialogDone);
|
||||
mNameDialog->setVisible(true);
|
||||
break;
|
||||
|
||||
}
|
||||
case GM_Race:
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mRaceDialog));
|
||||
mRaceDialog = std::make_unique<RaceDialog>(mParent, mResourceSystem);
|
||||
mRaceDialog->setNextButtonShow(mCreationStage >= CSE_RaceChosen);
|
||||
|
|
@ -179,8 +181,9 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_NameChosen)
|
||||
mCreationStage = CSE_NameChosen;
|
||||
break;
|
||||
|
||||
}
|
||||
case GM_Class:
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mClassChoiceDialog));
|
||||
mClassChoiceDialog = std::make_unique<ClassChoiceDialog>();
|
||||
mClassChoiceDialog->eventButtonSelected
|
||||
|
|
@ -189,8 +192,9 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
|
||||
}
|
||||
case GM_ClassPick:
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mPickClassDialog));
|
||||
mPickClassDialog = std::make_unique<PickClassDialog>();
|
||||
mPickClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
||||
|
|
@ -201,8 +205,9 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
|
||||
}
|
||||
case GM_Birth:
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mBirthSignDialog));
|
||||
mBirthSignDialog = std::make_unique<BirthDialog>();
|
||||
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
|
||||
|
|
@ -213,8 +218,9 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_ClassChosen)
|
||||
mCreationStage = CSE_ClassChosen;
|
||||
break;
|
||||
|
||||
}
|
||||
case GM_ClassCreate:
|
||||
{
|
||||
if (mCreateClassDialog == nullptr)
|
||||
{
|
||||
mCreateClassDialog = std::make_unique<CreateClassDialog>();
|
||||
|
|
@ -228,7 +234,9 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
}
|
||||
case GM_ClassGenerate:
|
||||
{
|
||||
mGenerateClassStep = 0;
|
||||
mGenerateClass = ESM::RefId();
|
||||
mGenerateClassSpecializations[0] = 0;
|
||||
|
|
@ -238,7 +246,9 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_RaceChosen)
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
break;
|
||||
}
|
||||
case GM_Review:
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mReviewDialog));
|
||||
mReviewDialog = std::make_unique<ReviewDialog>();
|
||||
|
||||
|
|
@ -279,6 +289,11 @@ namespace MWGui
|
|||
if (mCreationStage < CSE_BirthSignChosen)
|
||||
mCreationStage = CSE_BirthSignChosen;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Log(Debug::Error) << "Unexpected GuiMode in CharacterCreation::spawnDialog: " << id;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
|
|
|
|||
|
|
@ -127,9 +127,9 @@ namespace MWGui
|
|||
getWidget(mFavoriteAttribute[0], "FavoriteAttribute0");
|
||||
getWidget(mFavoriteAttribute[1], "FavoriteAttribute1");
|
||||
|
||||
for (char i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
char theIndex = '0' + i;
|
||||
char theIndex = '0' + static_cast<char>(i);
|
||||
getWidget(mMajorSkill[i], std::string("MajorSkill").append(1, theIndex));
|
||||
getWidget(mMinorSkill[i], std::string("MinorSkill").append(1, theIndex));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ namespace MWGui
|
|||
mLines[prevFocus].mIcon->setControllerFocus(false);
|
||||
}
|
||||
|
||||
if (newFocus >= 0 && newFocus < mLines.size())
|
||||
if (newFocus < mLines.size())
|
||||
{
|
||||
mLines[newFocus].mText->setTextColour(textColours.link);
|
||||
mLines[newFocus].mIcon->setControllerFocus(true);
|
||||
|
|
|
|||
|
|
@ -359,10 +359,10 @@ namespace MWGui
|
|||
record.mRace = mCurrentRaceId;
|
||||
record.setIsMale(mGenderIndex == 0);
|
||||
|
||||
if (mFaceIndex >= 0 && mFaceIndex < mAvailableHeads.size())
|
||||
if (mFaceIndex < mAvailableHeads.size())
|
||||
record.mHead = mAvailableHeads[mFaceIndex];
|
||||
|
||||
if (mHairIndex >= 0 && mHairIndex < mAvailableHairs.size())
|
||||
if (mHairIndex < mAvailableHairs.size())
|
||||
record.mHair = mAvailableHairs[mHairIndex];
|
||||
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in a new issue