diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-22 01:22:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-22 01:22:38 +0300 |
commit | f95e58406341d5672048ed9dca293beea9ee6b2c (patch) | |
tree | 49bb3f3672bbd152f7ea962815d24ef8cdfb07b0 /src | |
parent | f3ac812e2079eac53c1a9db56541d7103bd14a61 (diff) | |
download | mv-f95e58406341d5672048ed9dca293beea9ee6b2c.tar.gz mv-f95e58406341d5672048ed9dca293beea9ee6b2c.tar.bz2 mv-f95e58406341d5672048ed9dca293beea9ee6b2c.tar.xz mv-f95e58406341d5672048ed9dca293beea9ee6b2c.zip |
Add more missing consts.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/localplayer.cpp | 2 | ||||
-rw-r--r-- | src/being/localplayer.h | 2 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 2 | ||||
-rw-r--r-- | src/gui/viewport.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.h | 2 | ||||
-rw-r--r-- | src/net/eathena/messagein.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/messagein.h | 2 | ||||
-rw-r--r-- | src/net/eathena/messageout.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/messageout.h | 2 | ||||
-rw-r--r-- | src/net/messageout.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/messagein.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/messagein.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/messageout.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/messageout.h | 2 |
15 files changed, 15 insertions, 15 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index c3cf67d66..30d629852 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -2005,7 +2005,7 @@ void LocalPlayer::navigateClean() tmpLayer->clean(); } -void LocalPlayer::updateMusic() +void LocalPlayer::updateMusic() const { if (mMap) { diff --git a/src/being/localplayer.h b/src/being/localplayer.h index d5cb3b873..b062cd6c2 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -404,7 +404,7 @@ class LocalPlayer final : public Being, const int oldVal1, const int oldVal2) override final; - void updateMusic(); + void updateMusic() const; void setAfkTime(const int v) { mAfkTime = v; } diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index e0d5d217f..341477c0f 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -582,7 +582,7 @@ void Viewport::mousePressed(MouseEvent &event) } } -void Viewport::getMouseTile(int &destX, int &destY) +void Viewport::getMouseTile(int &destX, int &destY) const { getMouseTile(mMouseX, mMouseY, destX, destY); } diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 1a959a858..a03137761 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -169,7 +169,7 @@ class Viewport final : public WindowContainer, void returnCamera(); - void getMouseTile(int &destX, int &destY); + void getMouseTile(int &destX, int &destY) const; int mMouseX; /**< Current mouse position in pixels. */ int mMouseY; /**< Current mouse position in pixels. */ diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index 00ab33bcc..8ad0958e1 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -448,7 +448,7 @@ void Setup_Colors::updateGradType() mBlueSlider->setEnabled(enable); } -void Setup_Colors::updateColor() +void Setup_Colors::updateColor() const { if (mSelected == -1 || !userPalette) return; diff --git a/src/gui/widgets/tabs/setup_colors.h b/src/gui/widgets/tabs/setup_colors.h index 8276b111b..da4fb6c90 100644 --- a/src/gui/widgets/tabs/setup_colors.h +++ b/src/gui/widgets/tabs/setup_colors.h @@ -84,7 +84,7 @@ class Setup_Colors final : public SetupTab, static void setEntry(Slider *const s, TextField *const t, const int value); - void updateColor(); + void updateColor() const; void updateGradType(); }; diff --git a/src/net/eathena/messagein.cpp b/src/net/eathena/messagein.cpp index fa19465a3..3a71e0c76 100644 --- a/src/net/eathena/messagein.cpp +++ b/src/net/eathena/messagein.cpp @@ -49,7 +49,7 @@ void MessageIn::postInit(const char *const str) readInt16(str); } -uint16_t MessageIn::readId() +uint16_t MessageIn::readId() const { int16_t value = -1; if (mPos + 2 <= mLength) diff --git a/src/net/eathena/messagein.h b/src/net/eathena/messagein.h index 218c3c3fb..da5f57d7d 100644 --- a/src/net/eathena/messagein.h +++ b/src/net/eathena/messagein.h @@ -57,7 +57,7 @@ class MessageIn final : public Net::MessageIn BeingId readBeingId(const char *const str) override final; - uint16_t readId(); + uint16_t readId() const; }; } // namespace EAthena diff --git a/src/net/eathena/messageout.cpp b/src/net/eathena/messageout.cpp index 83be120e5..a20d924c9 100644 --- a/src/net/eathena/messageout.cpp +++ b/src/net/eathena/messageout.cpp @@ -43,7 +43,7 @@ MessageOut::MessageOut(const int16_t id) : mData = mNetwork->mOutBuffer + CAST_SIZE(mNetwork->mOutSize); } -void MessageOut::expand(const size_t bytes) +void MessageOut::expand(const size_t bytes) const { mNetwork->mOutSize += CAST_U32(bytes); PacketCounters::incOutBytes(CAST_S32(bytes)); diff --git a/src/net/eathena/messageout.h b/src/net/eathena/messageout.h index 971a4be97..83f9fbe7f 100644 --- a/src/net/eathena/messageout.h +++ b/src/net/eathena/messageout.h @@ -70,7 +70,7 @@ class MessageOut final : public Net::MessageOut { mPos = 0; } private: - void expand(const size_t size) override final; + void expand(const size_t size) const override final; Network *mNetwork; }; diff --git a/src/net/messageout.h b/src/net/messageout.h index 8771f5240..d374fd018 100644 --- a/src/net/messageout.h +++ b/src/net/messageout.h @@ -105,7 +105,7 @@ class MessageOut notfinal * memory in advance instead of expanding size every time more data is * added. */ - virtual void expand(size_t size) = 0; + virtual void expand(size_t size) const = 0; char *mData; /**< Data building up. */ unsigned int mDataSize; /**< Size of data. */ diff --git a/src/net/tmwa/messagein.cpp b/src/net/tmwa/messagein.cpp index c8cf350e7..375e973f5 100644 --- a/src/net/tmwa/messagein.cpp +++ b/src/net/tmwa/messagein.cpp @@ -49,7 +49,7 @@ void MessageIn::postInit(const char *const str) readInt16(str); } -uint16_t MessageIn::readId() +uint16_t MessageIn::readId() const { int16_t value = -1; if (mPos + 2 <= mLength) diff --git a/src/net/tmwa/messagein.h b/src/net/tmwa/messagein.h index bbdab6c86..14c6b8156 100644 --- a/src/net/tmwa/messagein.h +++ b/src/net/tmwa/messagein.h @@ -57,7 +57,7 @@ class MessageIn final : public Net::MessageIn BeingId readBeingId(const char *const str) override final; - uint16_t readId(); + uint16_t readId() const; }; } // namespace TmwAthena diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index c0ac1ef03..82a67e924 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -43,7 +43,7 @@ MessageOut::MessageOut(const int16_t id) : mData = mNetwork->mOutBuffer + CAST_SIZE(mNetwork->mOutSize); } -void MessageOut::expand(const size_t bytes) +void MessageOut::expand(const size_t bytes) const { mNetwork->mOutSize += CAST_U32(bytes); PacketCounters::incOutBytes(CAST_S32(bytes)); diff --git a/src/net/tmwa/messageout.h b/src/net/tmwa/messageout.h index dd4abc569..b0dd2b1b0 100644 --- a/src/net/tmwa/messageout.h +++ b/src/net/tmwa/messageout.h @@ -70,7 +70,7 @@ class MessageOut final : public Net::MessageOut { mPos = 0; } private: - void expand(const size_t size) override final; + void expand(const size_t size) const override final; Network *mNetwork; }; |