diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-10-12 18:41:40 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-10-12 18:41:40 -0700 |
commit | edd67db458188a76934b963e6a40f7b681f86b3d (patch) | |
tree | c8dec729b3f539ba027b1b3559598dbad0a70546 /src/map/magic-expr-eval.hpp | |
parent | 524df2190b855c4096449a1aaa7b92a15875f7a7 (diff) | |
download | tmwa-edd67db458188a76934b963e6a40f7b681f86b3d.tar.gz tmwa-edd67db458188a76934b963e6a40f7b681f86b3d.tar.bz2 tmwa-edd67db458188a76934b963e6a40f7b681f86b3d.tar.xz tmwa-edd67db458188a76934b963e6a40f7b681f86b3d.zip |
Disallow unchecked being casts
Despite the fact that that's what the code always did,
it was sometimes wrong.
Diffstat (limited to 'src/map/magic-expr-eval.hpp')
-rw-r--r-- | src/map/magic-expr-eval.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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) |