From 3188738be5ee78651e31c1340fac7fed81bbefb5 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 7 Jan 2016 16:47:24 +0100 Subject: 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 --- src/char/int_homun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/char/int_homun.c') diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 1377bfbd8..2179b2aa3 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -347,11 +347,11 @@ int inter_homunculus_parse_frommap(int fd) switch( cmd ) { - case 0x3090: mapif->parse_homunculus_create(fd, (int)RFIFOW(fd,2), (int)RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,8)); break; + case 0x3090: mapif->parse_homunculus_create(fd, (int)RFIFOW(fd,2), (int)RFIFOL(fd,4), RFIFOP(fd,8)); break; case 0x3091: mapif->parse_homunculus_load (fd, (int)RFIFOL(fd,2), (int)RFIFOL(fd,6)); break; - case 0x3092: mapif->parse_homunculus_save (fd, (int)RFIFOW(fd,2), (int)RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,8)); break; + case 0x3092: mapif->parse_homunculus_save (fd, (int)RFIFOW(fd,2), (int)RFIFOL(fd,4), RFIFOP(fd,8)); break; case 0x3093: mapif->parse_homunculus_delete(fd, (int)RFIFOL(fd,2)); break; - case 0x3094: mapif->parse_homunculus_rename(fd, (int)RFIFOL(fd,2), (int)RFIFOL(fd,6), (char*)RFIFOP(fd,10)); break; + case 0x3094: mapif->parse_homunculus_rename(fd, (int)RFIFOL(fd,2), (int)RFIFOL(fd,6), RFIFOP(fd,10)); break; default: return 0; } -- cgit v1.2.3-60-g2f50