From edd67db458188a76934b963e6a40f7b681f86b3d Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 12 Oct 2013 18:41:40 -0700 Subject: Disallow unchecked being casts Despite the fact that that's what the code always did, it was sometimes wrong. --- src/map/magic-expr-eval.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/magic-expr-eval.hpp') diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp index 29fdab6..a4a71f8 100644 --- a/src/map/magic-expr-eval.hpp +++ b/src/map/magic-expr-eval.hpp @@ -36,9 +36,9 @@ void magic_area_rect(map_local **m, int *x, int *y, int *width, int *height, #define ARG_TYPE(x) args[x].ty #define ENTITY_TYPE(x) ARGENTITY(x)->bl_type -#define ARGPC(x) (ARGENTITY(x)->as_player()) -#define ARGNPC(x) (ARGENTITY(x)->as_npc()) -#define ARGMOB(x) (ARGENTITY(x)->as_mob()) +#define ARGPC(x) (ARGENTITY(x)->is_player()) +#define ARGNPC(x) (ARGENTITY(x)->is_npc()) +#define ARGMOB(x) (ARGENTITY(x)->is_mob()) #define ARG_MAY_BE_AREA(x) (ARG_TYPE(x) == TYPE::AREA || ARG_TYPE(x) == TYPE::LOCATION) -- cgit v1.2.3-70-g09d2