diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-17 23:11:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-17 23:11:36 +0300 |
commit | 5704f4887327b5415300c066ec5296c9dd110070 (patch) | |
tree | 1ce0308d3886b43d9f9c82809a7b25ddf49eda2f /src | |
parent | 6f7e50348f6366e5bf7f3a20b2b65297c811f3ba (diff) | |
download | mv-5704f4887327b5415300c066ec5296c9dd110070.tar.gz mv-5704f4887327b5415300c066ec5296c9dd110070.tar.bz2 mv-5704f4887327b5415300c066ec5296c9dd110070.tar.xz mv-5704f4887327b5415300c066ec5296c9dd110070.zip |
add restrict into statuswindow.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 32 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.h | 7 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 12 |
4 files changed, 31 insertions, 32 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index e08483f5d..2cf1e9168 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -87,8 +87,9 @@ class AttrDisplay : public Container protected: AttrDisplay(const Widget2 *const widget, - const int id, const std::string &name, - const std::string &shortName); + const int id, + const std::string &restrict name, + const std::string &restrict shortName); const int mId; const std::string mName; @@ -103,8 +104,8 @@ class DerDisplay final : public AttrDisplay { public: DerDisplay(const Widget2 *const widget, - const int id, const std::string &name, - const std::string &shortName); + const int id, const std::string &restrict name, + const std::string &restrict shortName); A_DELETE_COPY(DerDisplay) @@ -116,8 +117,8 @@ class ChangeDisplay final : public AttrDisplay, gcn::ActionListener { public: ChangeDisplay(const Widget2 *const widget, - const int id, const std::string &name, - const std::string &shortName); + const int id, const std::string &restrict name, + const std::string &restrict shortName); A_DELETE_COPY(ChangeDisplay) @@ -471,10 +472,9 @@ void StatusWindow::setPointsNeeded(const int id, const int needed) } } -void StatusWindow::addAttribute(const int id, const std::string &name, - const std::string &shortName, - const bool modifiable, - const std::string &description A_UNUSED) +void StatusWindow::addAttribute(const int id, const std::string &restrict name, + const std::string &restrict shortName, + const bool modifiable) { AttrDisplay *disp; @@ -768,8 +768,8 @@ void StatusWindow::action(const gcn::ActionEvent &event) } AttrDisplay::AttrDisplay(const Widget2 *const widget, - const int id, const std::string &name, - const std::string &shortName) : + const int id, const std::string &restrict name, + const std::string &restrict shortName) : Container(widget), mId(id), mName(name), @@ -802,8 +802,8 @@ std::string AttrDisplay::update() } DerDisplay::DerDisplay(const Widget2 *const widget, - const int id, const std::string &name, - const std::string &shortName) : + const int id, const std::string &restrict name, + const std::string &restrict shortName) : AttrDisplay(widget, id, name, shortName) { ContainerPlacer place = mLayout->getPlacer(0, 0); @@ -813,8 +813,8 @@ DerDisplay::DerDisplay(const Widget2 *const widget, } ChangeDisplay::ChangeDisplay(const Widget2 *const widget, - const int id, const std::string &name, - const std::string &shortName) : + const int id, const std::string &restrict name, + const std::string &restrict shortName) : AttrDisplay(widget, id, name, shortName), gcn::ActionListener(), mNeeded(1), diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index 8748e3feb..762ce4e08 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -60,10 +60,9 @@ class StatusWindow final : public Window, void setPointsNeeded(const int id, const int needed); - void addAttribute(const int id, const std::string &name, - const std::string &shortName = "", - const bool modifiable = false, - const std::string &description = ""); + void addAttribute(const int id, const std::string &restrict name, + const std::string &restrict shortName = "", + const bool modifiable = false); static void updateHPBar(ProgressBar *const bar, const bool showMax = false); diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index f6657db36..0e1cfebb4 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -240,12 +240,12 @@ void GeneralHandler::gameStarted() const // protection against double addition attributes. statusWindow->clearAttributes(); - statusWindow->addAttribute(STR, _("Strength"), "str", true, ""); - statusWindow->addAttribute(AGI, _("Agility"), "agi", true, ""); - statusWindow->addAttribute(VIT, _("Vitality"), "vit", true, ""); - statusWindow->addAttribute(INT, _("Intelligence"), "int", true, ""); - statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true, ""); - statusWindow->addAttribute(LUK, _("Luck"), "luk", true, ""); + statusWindow->addAttribute(STR, _("Strength"), "str", true); + statusWindow->addAttribute(AGI, _("Agility"), "agi", true); + statusWindow->addAttribute(VIT, _("Vitality"), "vit", true); + statusWindow->addAttribute(INT, _("Intelligence"), "int", true); + statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true); + statusWindow->addAttribute(LUK, _("Luck"), "luk", true); statusWindow->addAttribute(ATK, _("Attack")); statusWindow->addAttribute(DEF, _("Defense")); diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index d2fe22c62..725393790 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -269,17 +269,17 @@ void GeneralHandler::gameStarted() const statusWindow->clearAttributes(); // TRANSLATORS: player stat - statusWindow->addAttribute(STR, _("Strength"), "str", true, ""); + statusWindow->addAttribute(STR, _("Strength"), "str", true); // TRANSLATORS: player stat - statusWindow->addAttribute(AGI, _("Agility"), "agi", true, ""); + statusWindow->addAttribute(AGI, _("Agility"), "agi", true); // TRANSLATORS: player stat - statusWindow->addAttribute(VIT, _("Vitality"), "vit", true, ""); + statusWindow->addAttribute(VIT, _("Vitality"), "vit", true); // TRANSLATORS: player stat - statusWindow->addAttribute(INT, _("Intelligence"), "int", true, ""); + statusWindow->addAttribute(INT, _("Intelligence"), "int", true); // TRANSLATORS: player stat - statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true, ""); + statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true); // TRANSLATORS: player stat - statusWindow->addAttribute(LUK, _("Luck"), "luk", true, ""); + statusWindow->addAttribute(LUK, _("Luck"), "luk", true); // TRANSLATORS: player stat statusWindow->addAttribute(ATK, _("Attack")); |