1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 21:29:56 +00:00

Always include <memory> for smart pointers in MWGui

This commit is contained in:
Capostrophic 2019-02-25 18:47:42 +03:00
parent 3316938dfc
commit 216e1ab16f
11 changed files with 18 additions and 14 deletions

View file

@ -3,6 +3,7 @@
#include <MyGUI_Gui.h>
#include <MyGUI_Button.h>
#include <MyGUI_EditBox.h>
#include <MyGUI_ControllerManager.h>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"

View file

@ -1,12 +1,9 @@
#ifndef MWGUI_ALCHEMY_H
#define MWGUI_ALCHEMY_H
#include <memory>
#include <vector>
#include <MyGUI_ControllerManager.h>
#include "../mwmechanics/alchemy.hpp"
#include <components/widgets/numericeditbox.hpp>
#include "controllers.hpp"

View file

@ -6,6 +6,7 @@
#include "MyGUI_FontManager.h"
#include <functional>
#include <memory>
#include <stdint.h>
#include <components/settings/settings.hpp>

View file

@ -103,24 +103,18 @@ namespace MWGui
else
message = gmst.find("sNotifyMessage43")->mValue.getString();
std::stringstream dayStr;
dayStr << mDays;
if (message.find("%d") != std::string::npos)
message.replace(message.find("%d"), 2, dayStr.str());
Misc::StringUtils::replace(message, "%d", std::to_string(mDays).c_str(), 2);
for (std::set<int>::iterator it = skills.begin(); it != skills.end(); ++it)
{
std::string skillName = gmst.find(ESM::Skill::sSkillNameIds[*it])->mValue.getString();
std::stringstream skillValue;
skillValue << player.getClass().getNpcStats(player).getSkill(*it).getBase();
int skillValue = player.getClass().getNpcStats(player).getSkill(*it).getBase();
std::string skillMsg = gmst.find("sNotifyMessage44")->mValue.getString();
if (*it == ESM::Skill::Sneak || *it == ESM::Skill::Security)
skillMsg = gmst.find("sNotifyMessage39")->mValue.getString();
if (skillMsg.find("%s") != std::string::npos)
skillMsg.replace(skillMsg.find("%s"), 2, skillName);
if (skillMsg.find("%d") != std::string::npos)
skillMsg.replace(skillMsg.find("%d"), 2, skillValue.str());
Misc::StringUtils::replace(skillMsg, "%s", skillName.c_str(), 2);
Misc::StringUtils::replace(skillMsg, "%d", std::to_string(skillValue).c_str(), 2);
message += "\n" + skillMsg;
}

View file

@ -1,6 +1,8 @@
#ifndef MWGUI_LOADINGSCREEN_H
#define MWGUI_LOADINGSCREEN_H
#include <memory>
#include <osg/Timer>
#include <osg/ref_ptr>

View file

@ -2,6 +2,7 @@
#define MWGUI_MAPWINDOW_H
#include <stdint.h>
#include <memory>
#include "windowpinnablebase.hpp"

View file

@ -1,6 +1,8 @@
#ifndef MWGUI_RACE_H
#define MWGUI_RACE_H
#include <memory>
#include "windowbase.hpp"
#include <MyGUI_RenderManager.h>

View file

@ -1,6 +1,8 @@
#ifndef OPENMW_MWGUI_SAVEGAMEDIALOG_H
#define OPENMW_MWGUI_SAVEGAMEDIALOG_H
#include <memory>
#include "windowbase.hpp"
namespace MWState

View file

@ -2,6 +2,7 @@
#define OPENMW_MWGUI_SCREENFADER_H
#include <deque>
#include <memory>
#include "windowbase.hpp"

View file

@ -1,6 +1,7 @@
#ifndef OPENMW_GUI_SPELLVIEW_H
#define OPENMW_GUI_SPELLVIEW_H
#include <memory>
#include <tuple>
#include <MyGUI_Widget.h>

View file

@ -1,6 +1,8 @@
#ifndef OPENMW_MWGUI_VIDEOWIDGET_H
#define OPENMW_MWGUI_VIDEOWIDGET_H
#include <memory>
#include <MyGUI_Widget.h>
namespace Video