From 641508260de553b89e6d077115513bfba69ef98e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Aug 2014 13:32:17 +0300 Subject: Fix compilation warnings with some compilers. --- src/net/eathena/network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 9b3ede389..d1d3cfdde 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -106,9 +106,9 @@ int16_t packet_lengths[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -static const int packet_lengths_size - = static_cast(sizeof(packet_lengths) / sizeof(int16_t)); -static const int messagesSize = 0xffff; +static const unsigned int packet_lengths_size + = static_cast(sizeof(packet_lengths) / sizeof(int16_t)); +static const unsigned int messagesSize = 0xFFFFU; Network *Network::mInstance = nullptr; Network::Network() : @@ -150,7 +150,7 @@ void Network::unregisterHandler(MessageHandler *const handler) void Network::clearHandlers() { - for (int f = 0; f < messagesSize; f ++) + for (size_t f = 0; f < messagesSize; f ++) { if (mMessageHandlers[f]) { -- cgit v1.2.3-70-g09d2