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