From da9b0c5119c2521a2bd98cb375157ef5dd57473e Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Wed, 22 Nov 2023 22:02:06 +0100 Subject: [PATCH 1/2] Use MyGUI::UString's new string_view support --- apps/openmw/mwclass/activator.cpp | 4 +--- apps/openmw/mwclass/apparatus.cpp | 4 +--- apps/openmw/mwclass/armor.cpp | 4 +--- apps/openmw/mwclass/book.cpp | 4 +--- apps/openmw/mwclass/clothing.cpp | 4 +--- apps/openmw/mwclass/container.cpp | 3 +-- apps/openmw/mwclass/creature.cpp | 3 +-- apps/openmw/mwclass/door.cpp | 3 +-- apps/openmw/mwclass/esm4base.cpp | 4 +--- apps/openmw/mwclass/ingredient.cpp | 4 +--- apps/openmw/mwclass/light.cpp | 4 +--- apps/openmw/mwclass/lockpick.cpp | 4 +--- apps/openmw/mwclass/misc.cpp | 5 ++--- apps/openmw/mwclass/npc.cpp | 3 +-- apps/openmw/mwclass/potion.cpp | 4 +--- apps/openmw/mwclass/probe.cpp | 4 +--- apps/openmw/mwclass/repair.cpp | 4 +--- apps/openmw/mwclass/weapon.cpp | 4 +--- apps/openmw/mwgui/alchemywindow.cpp | 9 ++++----- apps/openmw/mwgui/birth.cpp | 10 +++++----- apps/openmw/mwgui/class.cpp | 11 +++++------ apps/openmw/mwgui/dialogue.cpp | 2 +- apps/openmw/mwgui/enchantingdialog.cpp | 20 +++++++++++--------- apps/openmw/mwgui/itemchargeview.cpp | 5 ++--- apps/openmw/mwgui/layout.cpp | 9 +++------ apps/openmw/mwgui/levelupdialog.cpp | 3 +-- apps/openmw/mwgui/loadingscreen.cpp | 2 +- apps/openmw/mwgui/messagebox.cpp | 10 +++++----- apps/openmw/mwgui/race.cpp | 8 ++++---- apps/openmw/mwgui/review.cpp | 5 ++--- apps/openmw/mwgui/savegamedialog.cpp | 5 ++--- apps/openmw/mwgui/settingswindow.cpp | 10 ++++------ apps/openmw/mwgui/statswindow.cpp | 5 ++--- apps/openmw/mwgui/textinput.cpp | 6 ++---- apps/openmw/mwgui/tooltips.cpp | 3 +-- apps/openmw/mwgui/ustring.hpp | 15 --------------- apps/openmw/mwgui/widgets.cpp | 9 +++------ apps/openmw/mwgui/windowmanagerimp.cpp | 7 +++---- 38 files changed, 80 insertions(+), 143 deletions(-) delete mode 100644 apps/openmw/mwgui/ustring.hpp diff --git a/apps/openmw/mwclass/activator.cpp b/apps/openmw/mwclass/activator.cpp index 9e99b4cacb..96f5d5e993 100644 --- a/apps/openmw/mwclass/activator.cpp +++ b/apps/openmw/mwclass/activator.cpp @@ -27,7 +27,6 @@ #include "../mwrender/vismask.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwmechanics/npcstats.hpp" @@ -102,8 +101,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); std::string text; if (MWBase::Environment::get().getWindowManager()->getFullHelp()) diff --git a/apps/openmw/mwclass/apparatus.cpp b/apps/openmw/mwclass/apparatus.cpp index 2fbe2f9f87..28a53b85d2 100644 --- a/apps/openmw/mwclass/apparatus.cpp +++ b/apps/openmw/mwclass/apparatus.cpp @@ -15,7 +15,6 @@ #include "../mwrender/renderinginterface.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "classmodel.hpp" @@ -92,8 +91,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index 54561e3b0f..dbe4c6add6 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -24,7 +24,6 @@ #include "../mwrender/renderinginterface.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "classmodel.hpp" @@ -217,8 +216,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index b2b65e01b2..51ad0b6252 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -19,7 +19,6 @@ #include "../mwrender/renderinginterface.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwmechanics/npcstats.hpp" @@ -111,8 +110,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/clothing.cpp b/apps/openmw/mwclass/clothing.cpp index cbc5cecb70..fa866b299a 100644 --- a/apps/openmw/mwclass/clothing.cpp +++ b/apps/openmw/mwclass/clothing.cpp @@ -16,7 +16,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -154,8 +153,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index db9e2fc08d..8197701b07 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -24,7 +24,6 @@ #include "../mwworld/worldmodel.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/animation.hpp" #include "../mwrender/objects.hpp" @@ -249,7 +248,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)); std::string text; int lockLevel = ptr.getCellRef().getLockLevel(); diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index eebcb99512..ee4c36ad2c 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -45,7 +45,6 @@ #include "../mwrender/renderinginterface.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "classmodel.hpp" @@ -582,7 +581,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)); std::string text; if (MWBase::Environment::get().getWindowManager()->getFullHelp()) diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index ecd6cb59aa..ef928ecc89 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -25,7 +25,6 @@ #include "../mwworld/worldmodel.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/animation.hpp" #include "../mwrender/objects.hpp" @@ -267,7 +266,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)); std::string text; diff --git a/apps/openmw/mwclass/esm4base.cpp b/apps/openmw/mwclass/esm4base.cpp index 956fc210ee..fe75aab61e 100644 --- a/apps/openmw/mwclass/esm4base.cpp +++ b/apps/openmw/mwclass/esm4base.cpp @@ -5,7 +5,6 @@ #include #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -35,8 +34,7 @@ namespace MWClass MWGui::ToolTipInfo ESM4Impl::getToolTipInfo(std::string_view name, int count) { MWGui::ToolTipInfo info; - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); return info; } } diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index e87f74218b..a35973dd87 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -16,7 +16,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -107,8 +106,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/light.cpp b/apps/openmw/mwclass/light.cpp index 931ed73dfe..54cb75e88c 100644 --- a/apps/openmw/mwclass/light.cpp +++ b/apps/openmw/mwclass/light.cpp @@ -21,7 +21,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -159,8 +158,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/lockpick.cpp b/apps/openmw/mwclass/lockpick.cpp index 1fc65c8f79..0d5f10082c 100644 --- a/apps/openmw/mwclass/lockpick.cpp +++ b/apps/openmw/mwclass/lockpick.cpp @@ -15,7 +15,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -104,8 +103,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index 6c517e3dde..f223e94530 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -19,7 +19,6 @@ #include "../mwworld/worldmodel.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -151,8 +150,8 @@ namespace MWClass countString = " (" + std::to_string(count) + ")"; std::string_view name = getName(ptr); - info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) - + MWGui::ToolTips::getCountString(count) + MWGui::ToolTips::getSoulString(ptr.getCellRef()); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count) + + MWGui::ToolTips::getSoulString(ptr.getCellRef()); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index dab6dc99ae..22c1a81446 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -57,7 +57,6 @@ #include "../mwrender/renderinginterface.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" namespace { @@ -1089,7 +1088,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)); if (fullHelp && !ref->mBase->mName.empty() && ptr.getRefData().getCustomData() && ptr.getRefData().getCustomData()->asNpcCustomData().mNpcStats.isWerewolf()) { diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index 9bab0345cb..211a89ed4f 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -13,7 +13,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -95,8 +94,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/probe.cpp b/apps/openmw/mwclass/probe.cpp index e020c89443..a3ababa2ca 100644 --- a/apps/openmw/mwclass/probe.cpp +++ b/apps/openmw/mwclass/probe.cpp @@ -15,7 +15,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -103,8 +102,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/repair.cpp b/apps/openmw/mwclass/repair.cpp index 68fc2f60da..36deffebb3 100644 --- a/apps/openmw/mwclass/repair.cpp +++ b/apps/openmw/mwclass/repair.cpp @@ -13,7 +13,6 @@ #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -105,8 +104,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; std::string text; diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index 68a66b69d9..c2e1b47370 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -20,7 +20,6 @@ #include "../mwmechanics/weapontype.hpp" #include "../mwgui/tooltips.hpp" -#include "../mwgui/ustring.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" @@ -150,8 +149,7 @@ namespace MWClass MWGui::ToolTipInfo info; std::string_view name = getName(ptr); - info.caption - = MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count); + info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count); info.icon = ref->mBase->mIcon; const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore(); diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp index 7208fce5f6..ab8a52db7c 100644 --- a/apps/openmw/mwgui/alchemywindow.cpp +++ b/apps/openmw/mwgui/alchemywindow.cpp @@ -28,7 +28,6 @@ #include "itemview.hpp" #include "itemwidget.hpp" #include "sortfilteritemmodel.hpp" -#include "ustring.hpp" #include "widgets.hpp" namespace MWGui @@ -164,7 +163,7 @@ namespace MWGui auto const& wm = MWBase::Environment::get().getWindowManager(); std::string_view ingredient = wm->getGameSettingString("sIngredients", "Ingredients"); - if (mFilterType->getCaption() == toUString(ingredient)) + if (mFilterType->getCaption() == ingredient) mCurrentFilter = FilterType::ByName; else mCurrentFilter = FilterType::ByEffect; @@ -176,17 +175,17 @@ namespace MWGui void AlchemyWindow::switchFilterType(MyGUI::Widget* _sender) { auto const& wm = MWBase::Environment::get().getWindowManager(); - MyGUI::UString ingredient = toUString(wm->getGameSettingString("sIngredients", "Ingredients")); + std::string_view ingredient = wm->getGameSettingString("sIngredients", "Ingredients"); auto* button = _sender->castType(); if (button->getCaption() == ingredient) { - button->setCaption(toUString(wm->getGameSettingString("sMagicEffects", "Magic Effects"))); + button->setCaption(MyGUI::UString(wm->getGameSettingString("sMagicEffects", "Magic Effects"))); mCurrentFilter = FilterType::ByEffect; } else { - button->setCaption(ingredient); + button->setCaption(MyGUI::UString(ingredient)); mCurrentFilter = FilterType::ByName; } mSortModel->setNameFilter({}); diff --git a/apps/openmw/mwgui/birth.cpp b/apps/openmw/mwgui/birth.cpp index 617c373b0b..151ac8bd1e 100644 --- a/apps/openmw/mwgui/birth.cpp +++ b/apps/openmw/mwgui/birth.cpp @@ -18,7 +18,6 @@ #include "../mwworld/esmstore.hpp" #include "../mwworld/player.hpp" -#include "ustring.hpp" #include "widgets.hpp" namespace @@ -56,7 +55,8 @@ namespace MWGui MyGUI::Button* okButton; getWidget(okButton, "OKButton"); - okButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + okButton->setCaption( + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked); updateBirths(); @@ -70,10 +70,10 @@ namespace MWGui if (shown) okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); else okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); } void BirthDialog::onOpen() @@ -235,7 +235,7 @@ namespace MWGui { MyGUI::TextBox* label = mSpellArea->createWidget("SandBrightText", coord, MyGUI::Align::Default, "Label"); - label->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString( + label->setCaption(MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString( categories[category].label, {}))); mSpellItems.push_back(label); coord.top += lineHeight; diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index f71da8bdf5..39df017c19 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -20,7 +20,6 @@ #include #include "tooltips.hpp" -#include "ustring.hpp" namespace { @@ -129,10 +128,10 @@ namespace MWGui if (shown) okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); else okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); } void PickClassDialog::onOpen() @@ -546,10 +545,10 @@ namespace MWGui if (shown) okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); else okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); } // widget controls @@ -869,7 +868,7 @@ namespace MWGui getWidget(okButton, "OKButton"); okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked); okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sInputMenu1", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sInputMenu1", {}))); // Make sure the edit box has focus MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit); diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 4ab77c3956..1d3b453214 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -337,7 +337,7 @@ namespace MWGui void DialogueWindow::onTradeComplete() { MyGUI::UString message = MyGUI::LanguageManager::getInstance().replaceTags("#{sBarterDialog5}"); - addResponse({}, message.asUTF8()); + addResponse({}, message); } bool DialogueWindow::exit() diff --git a/apps/openmw/mwgui/enchantingdialog.cpp b/apps/openmw/mwgui/enchantingdialog.cpp index e70599697a..6ae6a6e9e5 100644 --- a/apps/openmw/mwgui/enchantingdialog.cpp +++ b/apps/openmw/mwgui/enchantingdialog.cpp @@ -26,7 +26,6 @@ #include "itemwidget.hpp" #include "sortfilteritemmodel.hpp" -#include "ustring.hpp" namespace MWGui { @@ -95,7 +94,7 @@ namespace MWGui else { std::string_view name = item.getClass().getName(item); - mName->setCaption(toUString(name)); + mName->setCaption(MyGUI::UString(name)); mItemBox->setItem(item); mItemBox->setUserString("ToolTipType", "ItemPtr"); mItemBox->setUserData(MWWorld::Ptr(item)); @@ -115,23 +114,26 @@ namespace MWGui switch (mEnchanting.getCastStyle()) { case ESM::Enchantment::CastOnce: - mTypeButton->setCaption(toUString( + mTypeButton->setCaption(MyGUI::UString( MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastOnce", "Cast Once"))); setConstantEffect(false); break; case ESM::Enchantment::WhenStrikes: - mTypeButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString( - "sItemCastWhenStrikes", "When Strikes"))); + mTypeButton->setCaption( + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString( + "sItemCastWhenStrikes", "When Strikes"))); setConstantEffect(false); break; case ESM::Enchantment::WhenUsed: - mTypeButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString( - "sItemCastWhenUsed", "When Used"))); + mTypeButton->setCaption( + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString( + "sItemCastWhenUsed", "When Used"))); setConstantEffect(false); break; case ESM::Enchantment::ConstantEffect: - mTypeButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString( - "sItemCastConstant", "Cast Constant"))); + mTypeButton->setCaption( + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString( + "sItemCastConstant", "Cast Constant"))); setConstantEffect(true); break; } diff --git a/apps/openmw/mwgui/itemchargeview.cpp b/apps/openmw/mwgui/itemchargeview.cpp index ba74eadc7a..e631b671b0 100644 --- a/apps/openmw/mwgui/itemchargeview.cpp +++ b/apps/openmw/mwgui/itemchargeview.cpp @@ -18,7 +18,6 @@ #include "itemmodel.hpp" #include "itemwidget.hpp" -#include "ustring.hpp" namespace MWGui { @@ -130,7 +129,7 @@ namespace MWGui std::stable_sort(mLines.begin(), mLines.end(), [](const MWGui::ItemChargeView::Line& a, const MWGui::ItemChargeView::Line& b) { - return Misc::StringUtils::ciLess(a.mText->getCaption().asUTF8(), b.mText->getCaption().asUTF8()); + return Misc::StringUtils::ciLess(a.mText->getCaption(), b.mText->getCaption()); }); layoutWidgets(); @@ -182,7 +181,7 @@ namespace MWGui void ItemChargeView::updateLine(const ItemChargeView::Line& line) { std::string_view name = line.mItemPtr.getClass().getName(line.mItemPtr); - line.mText->setCaption(toUString(name)); + line.mText->setCaption(MyGUI::UString(name)); line.mCharge->setVisible(false); switch (mDisplayMode) diff --git a/apps/openmw/mwgui/layout.cpp b/apps/openmw/mwgui/layout.cpp index fb0fb5e1c5..5f8bea7bba 100644 --- a/apps/openmw/mwgui/layout.cpp +++ b/apps/openmw/mwgui/layout.cpp @@ -6,8 +6,6 @@ #include #include -#include "ustring.hpp" - namespace MWGui { void Layout::initialise(std::string_view _layout) @@ -52,16 +50,15 @@ namespace MWGui { MyGUI::Widget* pt; getWidget(pt, name); - static_cast(pt)->setCaption(toUString(caption)); + static_cast(pt)->setCaption(MyGUI::UString(caption)); } void Layout::setTitle(std::string_view title) { MyGUI::Window* window = static_cast(mMainWidget); - MyGUI::UString uTitle = toUString(title); - if (window->getCaption() != uTitle) - window->setCaptionWithReplacing(uTitle); + if (window->getCaption() != title) + window->setCaptionWithReplacing(MyGUI::UString(title)); } MyGUI::Widget* Layout::getWidget(std::string_view _name) diff --git a/apps/openmw/mwgui/levelupdialog.cpp b/apps/openmw/mwgui/levelupdialog.cpp index 41b2dadeb9..056c4bdb16 100644 --- a/apps/openmw/mwgui/levelupdialog.cpp +++ b/apps/openmw/mwgui/levelupdialog.cpp @@ -22,7 +22,6 @@ #include "../mwmechanics/npcstats.hpp" #include "class.hpp" -#include "ustring.hpp" namespace { @@ -176,7 +175,7 @@ namespace MWGui if (levelupdescription.empty()) levelupdescription = Fallback::Map::getString("Level_Up_Default"); - mLevelDescription->setCaption(toUString(levelupdescription)); + mLevelDescription->setCaption(MyGUI::UString(levelupdescription)); unsigned int availableAttributes = 0; for (const ESM::Attribute& attribute : MWBase::Environment::get().getESMStore()->get()) diff --git a/apps/openmw/mwgui/loadingscreen.cpp b/apps/openmw/mwgui/loadingscreen.cpp index fd7afa2d8a..b70651f597 100644 --- a/apps/openmw/mwgui/loadingscreen.cpp +++ b/apps/openmw/mwgui/loadingscreen.cpp @@ -191,7 +191,7 @@ namespace MWGui // we may still want to show the label if the caller requested it if (mImportantLabel) { - MWBase::Environment::get().getWindowManager()->messageBox(mLoadingText->getCaption().asUTF8()); + MWBase::Environment::get().getWindowManager()->messageBox(mLoadingText->getCaption()); mImportantLabel = false; } } diff --git a/apps/openmw/mwgui/messagebox.cpp b/apps/openmw/mwgui/messagebox.cpp index b22fb873fa..712a5b7c7b 100644 --- a/apps/openmw/mwgui/messagebox.cpp +++ b/apps/openmw/mwgui/messagebox.cpp @@ -379,17 +379,17 @@ namespace MWGui MyGUI::Widget* InteractiveMessageBox::getDefaultKeyFocus() { - std::vector keywords{ "sOk", "sYes" }; if (mDefaultFocus >= 0 && mDefaultFocus < static_cast(mButtons.size())) return mButtons[mDefaultFocus]; + auto& languageManager = MyGUI::LanguageManager::getInstance(); + std::vector keywords{ languageManager.replaceTags("#{sOk}"), + languageManager.replaceTags("#{sYes}") }; for (MyGUI::Button* button : mButtons) { - for (const std::string& keyword : keywords) + for (const MyGUI::UString& keyword : keywords) { - if (Misc::StringUtils::ciEqual( - MyGUI::LanguageManager::getInstance().replaceTags("#{" + keyword + "}").asUTF8(), - button->getCaption().asUTF8())) + if (Misc::StringUtils::ciEqual(keyword, button->getCaption())) { return button; } diff --git a/apps/openmw/mwgui/race.cpp b/apps/openmw/mwgui/race.cpp index da5c0c9ca8..cf0eea1f0c 100644 --- a/apps/openmw/mwgui/race.cpp +++ b/apps/openmw/mwgui/race.cpp @@ -19,7 +19,6 @@ #include "../mwworld/esmstore.hpp" #include "tooltips.hpp" -#include "ustring.hpp" namespace { @@ -114,7 +113,8 @@ namespace MWGui MyGUI::Button* okButton; getWidget(okButton, "OKButton"); - okButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + okButton->setCaption( + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked); updateRaces(); @@ -129,10 +129,10 @@ namespace MWGui if (shown) okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); else okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); } void RaceDialog::onOpen() diff --git a/apps/openmw/mwgui/review.cpp b/apps/openmw/mwgui/review.cpp index 04c3806c0e..322497c84d 100644 --- a/apps/openmw/mwgui/review.cpp +++ b/apps/openmw/mwgui/review.cpp @@ -19,7 +19,6 @@ #include "../mwworld/esmstore.hpp" #include "tooltips.hpp" -#include "ustring.hpp" namespace { @@ -272,7 +271,7 @@ namespace MWGui MyGUI::TextBox* groupWidget = mSkillView->createWidget("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default); groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel); - groupWidget->setCaption(toUString(label)); + groupWidget->setCaption(MyGUI::UString(label)); mSkillWidgets.push_back(groupWidget); const int lineHeight = Settings::gui().mFontSize + 2; @@ -287,7 +286,7 @@ namespace MWGui MyGUI::TextBox* skillValueWidget; skillNameWidget = mSkillView->createWidget("SandText", coord1, MyGUI::Align::Default); - skillNameWidget->setCaption(toUString(text)); + skillNameWidget->setCaption(MyGUI::UString(text)); skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel); skillValueWidget = mSkillView->createWidget("SandTextRight", coord2, MyGUI::Align::Default); diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp index 4f78c27f05..50e1b63fe3 100644 --- a/apps/openmw/mwgui/savegamedialog.cpp +++ b/apps/openmw/mwgui/savegamedialog.cpp @@ -35,7 +35,6 @@ #include "../mwstate/character.hpp" #include "confirmationdialog.hpp" -#include "ustring.hpp" namespace MWGui { @@ -198,7 +197,7 @@ namespace MWGui } title << " (#{sLevel} " << signature.mPlayerLevel << " " - << MyGUI::TextIterator::toTagsString(toUString(className)) << ")"; + << MyGUI::TextIterator::toTagsString(MyGUI::UString(className)) << ")"; mCharacterSelection->addItem(MyGUI::LanguageManager::getInstance().replaceTags(title.str())); @@ -302,7 +301,7 @@ namespace MWGui if (mSaving) { - MWBase::Environment::get().getStateManager()->saveGame(mSaveNameEdit->getCaption().asUTF8(), mCurrentSlot); + MWBase::Environment::get().getStateManager()->saveGame(mSaveNameEdit->getCaption(), mCurrentSlot); } else { diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 7cefa7bda8..b3f0d75c12 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -38,7 +38,6 @@ #include "../mwbase/world.hpp" #include "confirmationdialog.hpp" -#include "ustring.hpp" namespace { @@ -659,18 +658,17 @@ namespace MWGui void SettingsWindow::onButtonToggled(MyGUI::Widget* _sender) { - MyGUI::UString on = toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOn", "On")); + std::string_view on = MWBase::Environment::get().getWindowManager()->getGameSettingString("sOn", "On"); bool newState; if (_sender->castType()->getCaption() == on) { - MyGUI::UString off - = toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOff", "Off")); - _sender->castType()->setCaption(off); + _sender->castType()->setCaption( + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOff", "Off"))); newState = false; } else { - _sender->castType()->setCaption(on); + _sender->castType()->setCaption(MyGUI::UString(on)); newState = true; } diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index cb16ab6d15..6e7d2c2ba2 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -32,7 +32,6 @@ #include "../mwmechanics/npcstats.hpp" #include "tooltips.hpp" -#include "ustring.hpp" namespace MWGui { @@ -417,7 +416,7 @@ namespace MWGui MyGUI::TextBox* groupWidget = mSkillView->createWidget("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch); - groupWidget->setCaption(toUString(label)); + groupWidget->setCaption(MyGUI::UString(label)); groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &StatsWindow::onMouseWheel); mSkillWidgets.push_back(groupWidget); @@ -433,7 +432,7 @@ namespace MWGui skillNameWidget = mSkillView->createWidget( "SandText", coord1, MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch); - skillNameWidget->setCaption(toUString(text)); + skillNameWidget->setCaption(MyGUI::UString(text)); skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &StatsWindow::onMouseWheel); skillValueWidget = mSkillView->createWidget( diff --git a/apps/openmw/mwgui/textinput.cpp b/apps/openmw/mwgui/textinput.cpp index 18a56e7284..881a671183 100644 --- a/apps/openmw/mwgui/textinput.cpp +++ b/apps/openmw/mwgui/textinput.cpp @@ -6,8 +6,6 @@ #include #include -#include "ustring.hpp" - namespace MWGui { @@ -35,10 +33,10 @@ namespace MWGui if (shown) okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); else okButton->setCaption( - toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); + MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {}))); } void TextInputDialog::setTextLabel(std::string_view label) diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 323579317a..b9da92e097 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -953,8 +953,7 @@ namespace MWGui widget->setUserString("Caption_MagicEffectSchool", "#{sSchool}: " + MyGUI::TextIterator::toTagsString( - store->get().find(effect->mData.mSchool)->mSchool->mName) - .asUTF8()); + store->get().find(effect->mData.mSchool)->mSchool->mName)); widget->setUserString("ImageTexture_MagicEffectImage", icon); } } diff --git a/apps/openmw/mwgui/ustring.hpp b/apps/openmw/mwgui/ustring.hpp deleted file mode 100644 index 5a6c30312a..0000000000 --- a/apps/openmw/mwgui/ustring.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef MWGUI_USTRING_H -#define MWGUI_USTRING_H - -#include - -namespace MWGui -{ - // FIXME: Remove once we get a version of MyGUI that supports string_view - inline MyGUI::UString toUString(std::string_view string) - { - return { string.data(), string.size() }; - } -} - -#endif \ No newline at end of file diff --git a/apps/openmw/mwgui/widgets.cpp b/apps/openmw/mwgui/widgets.cpp index 31e2689485..4a0eebf7c0 100644 --- a/apps/openmw/mwgui/widgets.cpp +++ b/apps/openmw/mwgui/widgets.cpp @@ -20,8 +20,6 @@ #include "../mwworld/esmstore.hpp" -#include "ustring.hpp" - namespace MWGui::Widgets { /* MWSkill */ @@ -135,8 +133,7 @@ namespace MWGui::Widgets } else { - MyGUI::UString name = toUString(attribute->mName); - mAttributeNameWidget->setCaption(name); + mAttributeNameWidget->setCaption(MyGUI::UString(attribute->mName)); } } if (mAttributeValueWidget) @@ -497,13 +494,13 @@ namespace MWGui::Widgets { std::stringstream out; out << mValue << "/" << mMax; - mBarTextWidget->setCaption(out.str().c_str()); + mBarTextWidget->setCaption(out.str()); } } void MWDynamicStat::setTitle(std::string_view text) { if (mTextWidget) - mTextWidget->setCaption(toUString(text)); + mTextWidget->setCaption(MyGUI::UString(text)); } MWDynamicStat::~MWDynamicStat() {} diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 7b3d35e011..3bd779a186 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -117,7 +117,6 @@ #include "tradewindow.hpp" #include "trainingwindow.hpp" #include "travelwindow.hpp" -#include "ustring.hpp" #include "videowidget.hpp" #include "waitdialog.hpp" @@ -788,8 +787,8 @@ namespace MWGui { if (getMode() == GM_Dialogue && showInDialogueMode != MWGui::ShowInDialogueMode_Never) { - MyGUI::UString text = MyGUI::LanguageManager::getInstance().replaceTags(toUString(message)); - mDialogueWindow->addMessageBox(text.asUTF8()); + MyGUI::UString text = MyGUI::LanguageManager::getInstance().replaceTags(MyGUI::UString(message)); + mDialogueWindow->addMessageBox(text); } else if (showInDialogueMode != MWGui::ShowInDialogueMode_Only) { @@ -1089,7 +1088,7 @@ namespace MWGui void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _result) { - std::string_view tag = _tag.asUTF8(); + std::string_view tag = _tag; std::string_view MyGuiPrefix = "setting="; From 81b8328bdde98bcffc3d91f915a6b6fbb16df0bd Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Thu, 23 Nov 2023 19:52:18 +0100 Subject: [PATCH 2/2] Include UString --- apps/openmw/mwclass/activator.cpp | 1 + apps/openmw/mwclass/apparatus.cpp | 1 + apps/openmw/mwclass/armor.cpp | 1 + apps/openmw/mwclass/book.cpp | 1 + apps/openmw/mwclass/clothing.cpp | 1 + apps/openmw/mwclass/container.cpp | 1 + apps/openmw/mwclass/creature.cpp | 1 + apps/openmw/mwclass/door.cpp | 1 + apps/openmw/mwclass/esm4base.cpp | 1 + apps/openmw/mwclass/ingredient.cpp | 1 + apps/openmw/mwclass/light.cpp | 1 + apps/openmw/mwclass/lockpick.cpp | 1 + apps/openmw/mwclass/misc.cpp | 1 + apps/openmw/mwclass/npc.cpp | 1 + apps/openmw/mwclass/potion.cpp | 1 + apps/openmw/mwclass/probe.cpp | 1 + apps/openmw/mwclass/repair.cpp | 1 + apps/openmw/mwclass/weapon.cpp | 1 + apps/openmw/mwgui/alchemywindow.cpp | 1 + apps/openmw/mwgui/birth.cpp | 1 + apps/openmw/mwgui/class.cpp | 1 + apps/openmw/mwgui/dialogue.cpp | 1 + apps/openmw/mwgui/enchantingdialog.cpp | 1 + apps/openmw/mwgui/itemchargeview.cpp | 1 + apps/openmw/mwgui/layout.cpp | 1 + apps/openmw/mwgui/levelupdialog.cpp | 1 + apps/openmw/mwgui/loadingscreen.cpp | 1 + apps/openmw/mwgui/messagebox.cpp | 1 + apps/openmw/mwgui/race.cpp | 1 + apps/openmw/mwgui/review.cpp | 1 + apps/openmw/mwgui/savegamedialog.cpp | 1 + apps/openmw/mwgui/settingswindow.cpp | 1 + apps/openmw/mwgui/textinput.cpp | 1 + apps/openmw/mwgui/tooltips.cpp | 1 + apps/openmw/mwgui/widgets.cpp | 1 + 35 files changed, 35 insertions(+) diff --git a/apps/openmw/mwclass/activator.cpp b/apps/openmw/mwclass/activator.cpp index 96f5d5e993..fc6cfadb55 100644 --- a/apps/openmw/mwclass/activator.cpp +++ b/apps/openmw/mwclass/activator.cpp @@ -1,6 +1,7 @@ #include "activator.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/apparatus.cpp b/apps/openmw/mwclass/apparatus.cpp index 28a53b85d2..10687171a0 100644 --- a/apps/openmw/mwclass/apparatus.cpp +++ b/apps/openmw/mwclass/apparatus.cpp @@ -1,6 +1,7 @@ #include "apparatus.hpp" #include +#include #include "../mwbase/environment.hpp" #include "../mwbase/windowmanager.hpp" diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index dbe4c6add6..4006f21ce7 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -1,6 +1,7 @@ #include "armor.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index 51ad0b6252..55de7a64ab 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -1,6 +1,7 @@ #include "book.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/clothing.cpp b/apps/openmw/mwclass/clothing.cpp index fa866b299a..0614c92eb9 100644 --- a/apps/openmw/mwclass/clothing.cpp +++ b/apps/openmw/mwclass/clothing.cpp @@ -1,6 +1,7 @@ #include "clothing.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index 8197701b07..0efbbc84fd 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -1,6 +1,7 @@ #include "container.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index ee4c36ad2c..2628cd3905 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -1,6 +1,7 @@ #include "creature.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index ef928ecc89..695bea5f10 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -1,6 +1,7 @@ #include "door.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/esm4base.cpp b/apps/openmw/mwclass/esm4base.cpp index fe75aab61e..77a5ad94a6 100644 --- a/apps/openmw/mwclass/esm4base.cpp +++ b/apps/openmw/mwclass/esm4base.cpp @@ -1,6 +1,7 @@ #include "esm4base.hpp" #include +#include #include diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index a35973dd87..3e07a24610 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -1,6 +1,7 @@ #include "ingredient.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/light.cpp b/apps/openmw/mwclass/light.cpp index 54cb75e88c..92ba8e1512 100644 --- a/apps/openmw/mwclass/light.cpp +++ b/apps/openmw/mwclass/light.cpp @@ -1,6 +1,7 @@ #include "light.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/lockpick.cpp b/apps/openmw/mwclass/lockpick.cpp index 0d5f10082c..6c46f2e66f 100644 --- a/apps/openmw/mwclass/lockpick.cpp +++ b/apps/openmw/mwclass/lockpick.cpp @@ -1,6 +1,7 @@ #include "lockpick.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index f223e94530..ae78773fa1 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -1,6 +1,7 @@ #include "misc.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 22c1a81446..b9e8bc8dfb 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -1,6 +1,7 @@ #include "npc.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index 211a89ed4f..5811ec10db 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -1,6 +1,7 @@ #include "potion.hpp" #include +#include #include "../mwbase/environment.hpp" #include "../mwbase/windowmanager.hpp" diff --git a/apps/openmw/mwclass/probe.cpp b/apps/openmw/mwclass/probe.cpp index a3ababa2ca..7a6c00824d 100644 --- a/apps/openmw/mwclass/probe.cpp +++ b/apps/openmw/mwclass/probe.cpp @@ -1,6 +1,7 @@ #include "probe.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/repair.cpp b/apps/openmw/mwclass/repair.cpp index 36deffebb3..0d38271aab 100644 --- a/apps/openmw/mwclass/repair.cpp +++ b/apps/openmw/mwclass/repair.cpp @@ -1,6 +1,7 @@ #include "repair.hpp" #include +#include #include #include diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index c2e1b47370..1cc2c86761 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -1,6 +1,7 @@ #include "weapon.hpp" #include +#include #include #include diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp index ab8a52db7c..333722a149 100644 --- a/apps/openmw/mwgui/alchemywindow.cpp +++ b/apps/openmw/mwgui/alchemywindow.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/birth.cpp b/apps/openmw/mwgui/birth.cpp index 151ac8bd1e..3dfdd17627 100644 --- a/apps/openmw/mwgui/birth.cpp +++ b/apps/openmw/mwgui/birth.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index 39df017c19..d6b4e7f635 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "../mwbase/environment.hpp" #include "../mwbase/windowmanager.hpp" diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 1d3b453214..79673463ef 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/enchantingdialog.cpp b/apps/openmw/mwgui/enchantingdialog.cpp index 6ae6a6e9e5..f5bcb1fb5f 100644 --- a/apps/openmw/mwgui/enchantingdialog.cpp +++ b/apps/openmw/mwgui/enchantingdialog.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/itemchargeview.cpp b/apps/openmw/mwgui/itemchargeview.cpp index e631b671b0..02c3cc182c 100644 --- a/apps/openmw/mwgui/itemchargeview.cpp +++ b/apps/openmw/mwgui/itemchargeview.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include diff --git a/apps/openmw/mwgui/layout.cpp b/apps/openmw/mwgui/layout.cpp index 5f8bea7bba..8d70bc956b 100644 --- a/apps/openmw/mwgui/layout.cpp +++ b/apps/openmw/mwgui/layout.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/levelupdialog.cpp b/apps/openmw/mwgui/levelupdialog.cpp index 056c4bdb16..2160a04b1b 100644 --- a/apps/openmw/mwgui/levelupdialog.cpp +++ b/apps/openmw/mwgui/levelupdialog.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/loadingscreen.cpp b/apps/openmw/mwgui/loadingscreen.cpp index b70651f597..1723841b32 100644 --- a/apps/openmw/mwgui/loadingscreen.cpp +++ b/apps/openmw/mwgui/loadingscreen.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/messagebox.cpp b/apps/openmw/mwgui/messagebox.cpp index 712a5b7c7b..b27adacd0f 100644 --- a/apps/openmw/mwgui/messagebox.cpp +++ b/apps/openmw/mwgui/messagebox.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/race.cpp b/apps/openmw/mwgui/race.cpp index cf0eea1f0c..7b445d419f 100644 --- a/apps/openmw/mwgui/race.cpp +++ b/apps/openmw/mwgui/race.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include diff --git a/apps/openmw/mwgui/review.cpp b/apps/openmw/mwgui/review.cpp index 322497c84d..4ea21df00c 100644 --- a/apps/openmw/mwgui/review.cpp +++ b/apps/openmw/mwgui/review.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp index 50e1b63fe3..8330c23f2f 100644 --- a/apps/openmw/mwgui/savegamedialog.cpp +++ b/apps/openmw/mwgui/savegamedialog.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index b3f0d75c12..696596a46f 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/textinput.cpp b/apps/openmw/mwgui/textinput.cpp index 881a671183..5f47b96f03 100644 --- a/apps/openmw/mwgui/textinput.cpp +++ b/apps/openmw/mwgui/textinput.cpp @@ -5,6 +5,7 @@ #include #include +#include namespace MWGui { diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index b9da92e097..bdcc4e76d7 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwgui/widgets.cpp b/apps/openmw/mwgui/widgets.cpp index 4a0eebf7c0..d824682308 100644 --- a/apps/openmw/mwgui/widgets.cpp +++ b/apps/openmw/mwgui/widgets.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include