mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 13:41:32 +00:00
Always include <memory> for smart pointers in MWGui
This commit is contained in:
parent
3316938dfc
commit
216e1ab16f
11 changed files with 18 additions and 14 deletions
|
@ -3,6 +3,7 @@
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_EditBox.h>
|
#include <MyGUI_EditBox.h>
|
||||||
|
#include <MyGUI_ControllerManager.h>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
#ifndef MWGUI_ALCHEMY_H
|
#ifndef MWGUI_ALCHEMY_H
|
||||||
#define MWGUI_ALCHEMY_H
|
#define MWGUI_ALCHEMY_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <MyGUI_ControllerManager.h>
|
|
||||||
|
|
||||||
#include "../mwmechanics/alchemy.hpp"
|
|
||||||
|
|
||||||
#include <components/widgets/numericeditbox.hpp>
|
#include <components/widgets/numericeditbox.hpp>
|
||||||
|
|
||||||
#include "controllers.hpp"
|
#include "controllers.hpp"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "MyGUI_FontManager.h"
|
#include "MyGUI_FontManager.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
|
|
@ -103,24 +103,18 @@ namespace MWGui
|
||||||
else
|
else
|
||||||
message = gmst.find("sNotifyMessage43")->mValue.getString();
|
message = gmst.find("sNotifyMessage43")->mValue.getString();
|
||||||
|
|
||||||
std::stringstream dayStr;
|
Misc::StringUtils::replace(message, "%d", std::to_string(mDays).c_str(), 2);
|
||||||
dayStr << mDays;
|
|
||||||
if (message.find("%d") != std::string::npos)
|
|
||||||
message.replace(message.find("%d"), 2, dayStr.str());
|
|
||||||
|
|
||||||
for (std::set<int>::iterator it = skills.begin(); it != skills.end(); ++it)
|
for (std::set<int>::iterator it = skills.begin(); it != skills.end(); ++it)
|
||||||
{
|
{
|
||||||
std::string skillName = gmst.find(ESM::Skill::sSkillNameIds[*it])->mValue.getString();
|
std::string skillName = gmst.find(ESM::Skill::sSkillNameIds[*it])->mValue.getString();
|
||||||
std::stringstream skillValue;
|
int skillValue = player.getClass().getNpcStats(player).getSkill(*it).getBase();
|
||||||
skillValue << player.getClass().getNpcStats(player).getSkill(*it).getBase();
|
|
||||||
std::string skillMsg = gmst.find("sNotifyMessage44")->mValue.getString();
|
std::string skillMsg = gmst.find("sNotifyMessage44")->mValue.getString();
|
||||||
if (*it == ESM::Skill::Sneak || *it == ESM::Skill::Security)
|
if (*it == ESM::Skill::Sneak || *it == ESM::Skill::Security)
|
||||||
skillMsg = gmst.find("sNotifyMessage39")->mValue.getString();
|
skillMsg = gmst.find("sNotifyMessage39")->mValue.getString();
|
||||||
|
|
||||||
if (skillMsg.find("%s") != std::string::npos)
|
Misc::StringUtils::replace(skillMsg, "%s", skillName.c_str(), 2);
|
||||||
skillMsg.replace(skillMsg.find("%s"), 2, skillName);
|
Misc::StringUtils::replace(skillMsg, "%d", std::to_string(skillValue).c_str(), 2);
|
||||||
if (skillMsg.find("%d") != std::string::npos)
|
|
||||||
skillMsg.replace(skillMsg.find("%d"), 2, skillValue.str());
|
|
||||||
message += "\n" + skillMsg;
|
message += "\n" + skillMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef MWGUI_LOADINGSCREEN_H
|
#ifndef MWGUI_LOADINGSCREEN_H
|
||||||
#define MWGUI_LOADINGSCREEN_H
|
#define MWGUI_LOADINGSCREEN_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <osg/Timer>
|
#include <osg/Timer>
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define MWGUI_MAPWINDOW_H
|
#define MWGUI_MAPWINDOW_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "windowpinnablebase.hpp"
|
#include "windowpinnablebase.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef MWGUI_RACE_H
|
#ifndef MWGUI_RACE_H
|
||||||
#define MWGUI_RACE_H
|
#define MWGUI_RACE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "windowbase.hpp"
|
#include "windowbase.hpp"
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OPENMW_MWGUI_SAVEGAMEDIALOG_H
|
#ifndef OPENMW_MWGUI_SAVEGAMEDIALOG_H
|
||||||
#define OPENMW_MWGUI_SAVEGAMEDIALOG_H
|
#define OPENMW_MWGUI_SAVEGAMEDIALOG_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "windowbase.hpp"
|
#include "windowbase.hpp"
|
||||||
|
|
||||||
namespace MWState
|
namespace MWState
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define OPENMW_MWGUI_SCREENFADER_H
|
#define OPENMW_MWGUI_SCREENFADER_H
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "windowbase.hpp"
|
#include "windowbase.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef OPENMW_GUI_SPELLVIEW_H
|
#ifndef OPENMW_GUI_SPELLVIEW_H
|
||||||
#define OPENMW_GUI_SPELLVIEW_H
|
#define OPENMW_GUI_SPELLVIEW_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
#include <MyGUI_Widget.h>
|
#include <MyGUI_Widget.h>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef OPENMW_MWGUI_VIDEOWIDGET_H
|
#ifndef OPENMW_MWGUI_VIDEOWIDGET_H
|
||||||
#define OPENMW_MWGUI_VIDEOWIDGET_H
|
#define OPENMW_MWGUI_VIDEOWIDGET_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <MyGUI_Widget.h>
|
#include <MyGUI_Widget.h>
|
||||||
|
|
||||||
namespace Video
|
namespace Video
|
||||||
|
|
Loading…
Reference in a new issue