summaryrefslogtreecommitdiff
path: root/src/net/tmwa/adminhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/adminhandler.cpp')
-rw-r--r--src/net/tmwa/adminhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index e77b9afdb..30c2bfe84 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -47,15 +47,15 @@ AdminHandler::AdminHandler() :
void AdminHandler::announce(const std::string &text) const
{
createOutPacket(CMSG_ADMIN_ANNOUNCE);
- outMsg.writeInt16(static_cast<int16_t>(text.length() + 4), "len");
- outMsg.writeString(text, static_cast<int>(text.length()), "message");
+ outMsg.writeInt16(CAST_S16(text.length() + 4), "len");
+ outMsg.writeString(text, CAST_S32(text.length()), "message");
}
void AdminHandler::localAnnounce(const std::string &text) const
{
createOutPacket(CMSG_ADMIN_LOCAL_ANNOUNCE);
- outMsg.writeInt16(static_cast<int16_t>(text.length() + 4), "len");
- outMsg.writeString(text, static_cast<int>(text.length()), "message");
+ outMsg.writeInt16(CAST_S16(text.length() + 4), "len");
+ outMsg.writeString(text, CAST_S32(text.length()), "message");
}
void AdminHandler::hide(const bool h A_UNUSED) const