summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-18 23:10:41 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-18 23:32:59 +0300
commit931920c3bee2151a79f9b54f4133af83f59ed052 (patch)
tree97425fa7cda6110765a2fff2a795eff4232e92d8
parent44e60a22b553a159a5cdc2e111c562af359e66ae (diff)
downloadplus-931920c3bee2151a79f9b54f4133af83f59ed052.tar.gz
plus-931920c3bee2151a79f9b54f4133af83f59ed052.tar.bz2
plus-931920c3bee2151a79f9b54f4133af83f59ed052.tar.xz
plus-931920c3bee2151a79f9b54f4133af83f59ed052.zip
Fix compilation with some compilers.
-rw-r--r--src/net/eathena/mail2handler.cpp2
-rw-r--r--src/resources/iteminfo.h4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index 3c412fc4e..bf6f178fb 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -111,7 +111,7 @@ void Mail2Handler::sendMail(const std::string &to,
const int titleSz = CAST_S32(title.size());
const int bodySz = CAST_S32(body.size());
int32_t sz = 2 + 2 + 24 + 24 + 8 + 2 + 2 + titleSz + bodySz;
- if (sz > INT16_MAX - 4)
+ if (sz > 32767 - 4)
{
reportAlways("Mail message too big");
return;
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 28b9d9049..e1fe30b33 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -28,9 +28,9 @@
#include "enums/resources/item/itemdbtype.h"
#include "enums/simpletypes/beingtypeid.h"
-#include "enums/simpletypes/itemcolor.h"
#include "resources/cursors.h"
+#include "resources/itemcolordata.h"
#include "resources/missileinfo.h"
#include "resources/soundinfo.h"
@@ -39,8 +39,6 @@
#include "utils/cast.h"
#include "utils/intmap.h"
-class ItemColorData;
-
struct ItemMenuItem;
// sprite, <itemfrom, itemto>