summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/messageout.cpp5
-rw-r--r--src/net/eathena/messageout.h2
-rw-r--r--src/net/tmwa/messageout.cpp5
-rw-r--r--src/net/tmwa/messageout.h2
4 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/messageout.cpp b/src/net/eathena/messageout.cpp
index 086d9f446..78a242851 100644
--- a/src/net/eathena/messageout.cpp
+++ b/src/net/eathena/messageout.cpp
@@ -45,6 +45,11 @@ MessageOut::MessageOut(const int16_t id) :
mData = mNetwork->mOutBuffer + CAST_SIZE(mNetwork->mOutSize);
}
+MessageOut::~MessageOut()
+{
+ DEBUGLOG2("writeEnd: ", mPos, "position after end of packet");
+}
+
void MessageOut::expand(const size_t bytes) const
{
mNetwork->mOutSize += CAST_U32(bytes);
diff --git a/src/net/eathena/messageout.h b/src/net/eathena/messageout.h
index 2c07d5cff..38525bad7 100644
--- a/src/net/eathena/messageout.h
+++ b/src/net/eathena/messageout.h
@@ -47,6 +47,8 @@ class MessageOut final : public Net::MessageOut
A_DELETE_COPY(MessageOut)
+ virtual ~MessageOut();
+
/**< Writes a short. */
void writeInt16(const int16_t value,
const char *const str) override final;
diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp
index f1784bf1d..64951642d 100644
--- a/src/net/tmwa/messageout.cpp
+++ b/src/net/tmwa/messageout.cpp
@@ -45,6 +45,11 @@ MessageOut::MessageOut(const int16_t id) :
mData = mNetwork->mOutBuffer + CAST_SIZE(mNetwork->mOutSize);
}
+MessageOut::~MessageOut()
+{
+ DEBUGLOG2("writeEnd: ", mPos, "position after end of packet");
+}
+
void MessageOut::expand(const size_t bytes) const
{
mNetwork->mOutSize += CAST_U32(bytes);
diff --git a/src/net/tmwa/messageout.h b/src/net/tmwa/messageout.h
index c807d55a5..18346b690 100644
--- a/src/net/tmwa/messageout.h
+++ b/src/net/tmwa/messageout.h
@@ -47,6 +47,8 @@ class MessageOut final : public Net::MessageOut
A_DELETE_COPY(MessageOut)
+ virtual ~MessageOut();
+
/**< Writes a short. */
void writeInt16(const int16_t value,
const char *const str) override final;