summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/messagein.cpp2
-rw-r--r--src/net/eathena/messagein.h2
-rw-r--r--src/net/eathena/messageout.cpp2
-rw-r--r--src/net/eathena/messageout.h2
-rw-r--r--src/net/messageout.h2
-rw-r--r--src/net/tmwa/messagein.cpp2
-rw-r--r--src/net/tmwa/messagein.h2
-rw-r--r--src/net/tmwa/messageout.cpp2
-rw-r--r--src/net/tmwa/messageout.h2
9 files changed, 9 insertions, 9 deletions
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;
};