From 64e742acdb9b0dd9c44bced91766f5ea1aa9de4c Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 28 Feb 2010 13:02:26 +0100 Subject: Removed a few pointless const qualifiers Reviewed-by: Jared Adams --- src/being.h | 2 +- src/gui/serverdialog.cpp | 2 +- src/gui/serverdialog.h | 2 +- src/gui/textdialog.h | 7 +++---- src/npc.cpp | 2 +- src/npc.h | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/being.h b/src/being.h index ff21825c..f1d98ba4 100644 --- a/src/being.h +++ b/src/being.h @@ -234,7 +234,7 @@ class Being : public Sprite, public ConfigListener */ virtual void setName(const std::string &name); - const bool getShowName() const + bool getShowName() const { return mShowName; } virtual void setShowName(bool doShowName); diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index 3d6c0b6f..e4a765e7 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -391,7 +391,7 @@ void ServerDialog::logic() Window::logic(); } -void ServerDialog::setFieldsReadOnly(const bool readOnly) +void ServerDialog::setFieldsReadOnly(bool readOnly) { if (readOnly) { diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index c4af6ab2..ad745187 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -143,7 +143,7 @@ class ServerDialog : public Window, static int downloadUpdate(void *ptr, DownloadStatus status, size_t total, size_t remaining); - void setFieldsReadOnly(const bool readOnly); + void setFieldsReadOnly(bool readOnly); TextField *mServerNameField; TextField *mPortField; diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h index 6db09e71..825d9ddc 100644 --- a/src/gui/textdialog.h +++ b/src/gui/textdialog.h @@ -43,8 +43,7 @@ public: */ TextDialog(const std::string &title, const std::string &msg, Window *parent = NULL); - - + ~TextDialog(); /** @@ -61,8 +60,8 @@ public: * Set the OK button action id */ void setOKButtonActionId(const std::string &name); - - static const bool isActive() { return instances > 0; } + + static bool isActive() { return instances > 0; } private: static int instances; diff --git a/src/npc.cpp b/src/npc.cpp index d104e840..38aecab8 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -86,7 +86,7 @@ void NPC::setSprite(unsigned int slot, int id, const std::string &color) // Do nothing } -const bool NPC::isTalking() +bool NPC::isTalking() { return NpcDialog::isActive() || BuyDialog::isActive() || SellDialog::isActive() || BuySellDialog::isActive() || diff --git a/src/npc.h b/src/npc.h index e4207ea7..c7db58f1 100644 --- a/src/npc.h +++ b/src/npc.h @@ -55,7 +55,7 @@ class NPC : public Player virtual int getNumberOfLayers() const { return 1; } - static const bool isTalking(); + static bool isTalking(); protected: /** -- cgit v1.2.3-60-g2f50