summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-01 23:56:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-02 14:28:17 +0300
commit520a495c466793c29f3e721634dfe6cc616b8ede (patch)
tree749b67f5d4df83f6f4997dabeb66ec394eabccd7 /src/gui/popups
parentf9030497b6196ce2fadb6b6ada5d784be227d9a6 (diff)
downloadmv-520a495c466793c29f3e721634dfe6cc616b8ede.tar.gz
mv-520a495c466793c29f3e721634dfe6cc616b8ede.tar.bz2
mv-520a495c466793c29f3e721634dfe6cc616b8ede.tar.xz
mv-520a495c466793c29f3e721634dfe6cc616b8ede.zip
Add missing const.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/popupmenu.cpp12
-rw-r--r--src/gui/popups/popupmenu.h10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index c8416f66d..9e6968464 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -311,7 +311,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
}
void PopupMenu::showPopup(const int x, const int y,
- std::vector<ActorSprite*> &beings)
+ const std::vector<ActorSprite*> &beings)
{
mX = x;
mY = y;
@@ -1543,7 +1543,7 @@ void PopupMenu::handleLink(const std::string &link,
std::list<std::string> mobs
= actorManager->getAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
- std::list<std::string>::iterator it2 = mobs.begin();
+ std::list<std::string>::iterator it2 = it;
while (it != mobs.end())
{
if (*it == mNick)
@@ -1574,7 +1574,7 @@ void PopupMenu::handleLink(const std::string &link,
std::list<std::string> mobs
= actorManager->getPriorityAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
- std::list<std::string>::iterator it2 = mobs.begin();
+ std::list<std::string>::iterator it2 = it;
while (it != mobs.end())
{
if (*it == mNick)
@@ -1605,7 +1605,7 @@ void PopupMenu::handleLink(const std::string &link,
std::list<std::string> mobs
= actorManager->getAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
- std::list<std::string>::iterator it2 = mobs.begin();
+ std::list<std::string>::iterator it2 = it;
while (it != mobs.end())
{
if (*it == mNick)
@@ -1640,7 +1640,7 @@ void PopupMenu::handleLink(const std::string &link,
std::list<std::string> mobs
= actorManager->getPriorityAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
- std::list<std::string>::iterator it2 = mobs.begin();
+ std::list<std::string>::iterator it2 = it;
while (it != mobs.end())
{
if (*it == mNick)
@@ -2906,7 +2906,7 @@ RenameListener::RenameListener() :
{
}
-void RenameListener::setMapItem(MapItem *const mapItem)
+void RenameListener::setMapItem(const MapItem *const mapItem)
{
if (mapItem)
{
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index 8bdbd3b1b..94db12343 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -55,7 +55,7 @@ class RenameListener final : public ActionListener
void action(const ActionEvent &event) override final;
- void setMapItem(MapItem *const mapItem);
+ void setMapItem(const MapItem *const mapItem);
void setDialog(TextDialog *dialog)
{ mDialog = dialog; }
@@ -75,13 +75,13 @@ class PlayerListener : public ActionListener
void action(const ActionEvent &event) override final;
- void setNick(std::string name)
+ void setNick(const std::string &name)
{ mNick = name; }
- void setDialog(TextDialog *dialog)
+ void setDialog(TextDialog *const dialog)
{ mDialog = dialog; }
- void setType(int type)
+ void setType(const int type)
{ mType = type; }
private:
@@ -114,7 +114,7 @@ class PopupMenu final : public Popup, public LinkHandler
* Shows the beings related popup menu at the specified mouse coords.
*/
void showPopup(const int x, const int y,
- std::vector<ActorSprite*> &beings);
+ const std::vector<ActorSprite*> &beings);
void showPlayerPopup(const int x, const int y,
const std::string &nick);