summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-11 11:35:47 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-11 11:35:47 +0000
commit212379e88207236d8d2fcaaac1636cd1520406b1 (patch)
treec773a6e83f8b83e035cbc85b696044ede60e7a84 /src/map
parentff4d9ac980318119e4293de7057a811dcf798d7d (diff)
downloadhercules-212379e88207236d8d2fcaaac1636cd1520406b1.tar.gz
hercules-212379e88207236d8d2fcaaac1636cd1520406b1.tar.bz2
hercules-212379e88207236d8d2fcaaac1636cd1520406b1.tar.xz
hercules-212379e88207236d8d2fcaaac1636cd1520406b1.zip
Fixed plenty "comparison of unsigned expression >= 0 is always true" warnings in multiple compilers
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16394 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 84ae71535..c5f1aaa02 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -633,15 +633,17 @@ enum e_pc_permission {
#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \
1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)))
//Checks if the given class value corresponds to a player class. [Skotlex]
-#define pcdb_checkid(class_) \
+//JOB_NOVICE isn't checked for class_ is supposed to be unsigned
+#define pcdb_checkid_sub(class_) \
( \
- ( (class_) >= JOB_NOVICE && (class_) < JOB_MAX_BASIC ) \
+ ( (class_) < JOB_MAX_BASIC ) \
|| ( (class_) >= JOB_NOVICE_HIGH && (class_) <= JOB_DARK_COLLECTOR ) \
|| ( (class_) >= JOB_RUNE_KNIGHT && (class_) <= JOB_MECHANIC_T2 ) \
|| ( (class_) >= JOB_BABY_RUNE && (class_) <= JOB_BABY_MECHANIC2 ) \
|| ( (class_) >= JOB_SUPER_NOVICE_E && (class_) <= JOB_SUPER_BABY_E ) \
|| ( (class_) >= JOB_KAGEROU && (class_) < JOB_MAX ) \
)
+#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)class_)
// clientside display macros (values to the left/right of the "+")
#ifdef RENEWAL