summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/killstats.cpp4
-rw-r--r--src/gui/minimap.cpp4
-rw-r--r--src/gui/popupmenu.cpp2
-rw-r--r--src/gui/socialwindow.cpp2
-rw-r--r--src/gui/socialwindow.h2
-rw-r--r--src/gui/theme.h6
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/guitable.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp2
-rw-r--r--src/gui/widgets/tab.cpp4
12 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp
index 61d8acfcb..d45e6a4bb 100644
--- a/src/gui/killstats.cpp
+++ b/src/gui/killstats.cpp
@@ -215,8 +215,8 @@ void KillStats::gainXp(int xp)
const int exp = PlayerInfo::getAttribute(PlayerInfo::EXP);
mLine1->setCaption(strprintf(_("Level: %d at %f%%"),
- player_node->getLevel(), static_cast<double>(exp) / static_cast<double>(
- xpNextLevel) * 100.0));
+ player_node->getLevel(), static_cast<double>(exp)
+ / static_cast<double>(xpNextLevel) * 100.0));
mLine2->setCaption(strprintf(_("Exp: %d/%d Left: %d"), exp,
xpNextLevel, xpNextLevel - exp));
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index c9362471f..8394af227 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -349,12 +349,12 @@ void Minimap::draw(gcn::Graphics *graphics)
if (player_node->isInParty())
{
- Party *const party = player_node->getParty();
+ const Party *const party = player_node->getParty();
if (party)
{
const PartyMember *const m = party->getMember(
player_node->getName());
- Party::MemberList *const members = party->getMembers();
+ const Party::MemberList *const members = party->getMembers();
if (m && members)
{
const std::string curMap = m->getMap();
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 8bc53836f..264cda9d5 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -1217,7 +1217,7 @@ void PopupMenu::handleLink(const std::string &link,
if (guild)
{
if (guild->getServerGuild())
- Net::getGuildHandler()->kick(guild->getMember(mNick));
+ Net::getGuildHandler()->kick(guild->getMember(mNick), "");
else if (guildManager)
guildManager->kick(mNick);
}
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index dde6b30f2..10eb2596e 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -663,7 +663,7 @@ public:
if (!socialWindow || !player_node)
return;
- Map *const map = socialWindow->getMap();
+ const Map *const map = socialWindow->getMap();
if (!map || map->empty())
return;
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 2c959695f..68abef2a4 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -103,7 +103,7 @@ public:
void prevTab();
- Map* getMap() const A_WARN_UNUSED
+ const Map* getMap() const A_WARN_UNUSED
{ return mMap; }
void setMap(Map *const map)
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 223716057..7914c9c26 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -76,19 +76,19 @@ class Skin final
/**
* Returns the background skin.
*/
- ImageRect &getBorder() const A_WARN_UNUSED
+ const ImageRect &getBorder() const A_WARN_UNUSED
{ return *mBorder; }
/**
* Returns the image used by a close button for this skin.
*/
- Image *getCloseImage(const bool state) const A_WARN_UNUSED
+ const Image *getCloseImage(const bool state) const A_WARN_UNUSED
{ return state ? mCloseImageHighlighted : mCloseImage; }
/**
* Returns the image used by a sticky button for this skin.
*/
- Image *getStickyImage(const bool state) const A_WARN_UNUSED
+ const Image *getStickyImage(const bool state) const A_WARN_UNUSED
{ return state ? mStickyImageDown : mStickyImageUp; }
/**
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 83c5f2c95..16f5b7db3 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -264,7 +264,7 @@ void Button::updateAlpha()
Skin *skin = button[mode];
if (skin)
{
- ImageRect &rect = skin->getBorder();
+ const ImageRect &rect = skin->getBorder();
Image *image = rect.grid[a];
if (image)
image->setAlpha(mAlpha);
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index ac0a226ee..77f81f72b 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -112,7 +112,7 @@ void CheckBox::updateAlpha()
mAlpha = alpha;
if (mSkin)
{
- ImageRect &rect = mSkin->getBorder();
+ const ImageRect &rect = mSkin->getBorder();
for (int a = 0; a < 6; a ++)
{
Image *const image = rect.grid[a];
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index e40248121..16604d760 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -121,7 +121,7 @@ GuiTable::~GuiTable()
mModel = nullptr;
}
-TableModel *GuiTable::getModel() const
+const TableModel *GuiTable::getModel() const
{
return mModel;
}
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 9657de9f8..0b2b4462c 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -66,7 +66,7 @@ public:
/**
* Retrieves the active table model
*/
- TableModel *getModel() const A_WARN_UNUSED;
+ const TableModel *getModel() const A_WARN_UNUSED;
/**
* Sets the table model
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 1a6b9df70..06391217d 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -92,7 +92,7 @@ void RadioButton::updateAlpha()
mAlpha = alpha;
if (mSkin)
{
- ImageRect &rect = mSkin->getBorder();
+ const ImageRect &rect = mSkin->getBorder();
for (int a = 0; a < 4; a ++)
{
Image *const image = rect.grid[a];
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 35a9a17b4..18e2510ee 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -141,7 +141,7 @@ void Tab::updateAlpha()
Skin *skin = tabImg[t];
if (skin)
{
- ImageRect &rect = skin->getBorder();
+ const ImageRect &rect = skin->getBorder();
Image *image = rect.grid[a];
if (image)
image->setAlpha(mAlpha);
@@ -205,7 +205,7 @@ void Tab::draw(gcn::Graphics *graphics)
// draw tab
if (openGLMode != 2)
{
- ImageRect &rect = skin->getBorder();
+ const ImageRect &rect = skin->getBorder();
if (mRedraw || mode != mMode
|| static_cast<Graphics*>(graphics)->getRedraw())
{