summaryrefslogtreecommitdiff
path: root/src/char/int_pet.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-01-07 16:47:24 +0100
committerHaru <haru@dotalux.com>2016-02-24 21:00:26 +0100
commit3188738be5ee78651e31c1340fac7fed81bbefb5 (patch)
tree97ea854a3c77884e817c02dc069b980ccc42ee74 /src/char/int_pet.c
parenta79ab6c3d11c7d6fcd1f04400f50b93f72e570e1 (diff)
downloadhercules-3188738be5ee78651e31c1340fac7fed81bbefb5.tar.gz
hercules-3188738be5ee78651e31c1340fac7fed81bbefb5.tar.bz2
hercules-3188738be5ee78651e31c1340fac7fed81bbefb5.tar.xz
hercules-3188738be5ee78651e31c1340fac7fed81bbefb5.zip
Removed several unnecessary RFIFOP typecasts
- While this is arguable, those explicit typecasts are potentially dangerous/misleading (for example, a const specifier might get accidentally dropped without even generating a compiler warning, or a variable type might change during code changes, and any related warning would get silenced by the explicit typecast). - As a reminder Hercules is written in C, and not in C++ (and there's no such thing as "compiling in C++ mode" - they're two different languages.) As such, it is legal to let the compiler automatically promote void* from/to any non-const pointer type, as well as const void* from/to any const pointer type. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/int_pet.c')
-rw-r--r--src/char/int_pet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 676ce6ed6..eb9bda8d0 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -311,7 +311,7 @@ int mapif_parse_CreatePet(int fd)
{
RFIFOHEAD(fd);
mapif->create_pet(fd, RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOW(fd, 10), RFIFOW(fd, 12), RFIFOW(fd, 14), RFIFOW(fd, 16), RFIFOW(fd, 18),
- RFIFOW(fd, 20), RFIFOB(fd, 22), RFIFOB(fd, 23), (char*)RFIFOP(fd, 24));
+ RFIFOW(fd, 20), RFIFOB(fd, 22), RFIFOB(fd, 23), RFIFOP(fd, 24));
return 0;
}
@@ -325,7 +325,7 @@ int mapif_parse_LoadPet(int fd)
int mapif_parse_SavePet(int fd)
{
RFIFOHEAD(fd);
- mapif->save_pet(fd, RFIFOL(fd, 4), (struct s_pet *) RFIFOP(fd, 8));
+ mapif->save_pet(fd, RFIFOL(fd, 4), RFIFOP(fd, 8));
return 0;
}