From 83db3bbee4e19e7426a32ee89ad6c2d8e48260f2 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 18 Jun 2013 20:03:57 -0700 Subject: Also poison memcpy, memmove, and memset --- src/map/magic-interpreter.hpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/map/magic-interpreter.hpp') diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp index f233f37..9b60d998 100644 --- a/src/map/magic-interpreter.hpp +++ b/src/map/magic-interpreter.hpp @@ -41,7 +41,7 @@ struct area_t } a_rect; dumb_ptr a_union[2]; - au() { memset(this, '\0', sizeof(*this)); } + au() { really_memzero_this(this); } ~au() = default; au(const au&) = default; au& operator = (const au&) = default; @@ -52,7 +52,7 @@ struct area_t struct val_t { - union v + union vu { int v_int; DIR v_dir; @@ -65,10 +65,10 @@ struct val_t dumb_ptr v_invocation; dumb_ptr v_spell; - v() { memset(this, '\0', sizeof(*this)); } - ~v() = default; - v(const v&) = default; - v& operator = (const v&) = default; + vu() { really_memzero_this(this); } + ~vu() = default; + vu(const vu&) = default; + vu& operator = (const vu&) = default; } v; TYPE ty; }; @@ -101,7 +101,7 @@ struct e_area_t } a_rect; dumb_ptr a_union[2]; - a0() { memset(this, '\0', sizeof(*this)); } + a0() { really_memzero_this(this); } ~a0() = default; a0(const a0&) = default; a0& operator = (const a0&) = default; @@ -129,7 +129,7 @@ struct expr_t int id; } e_field; - eu() { memset(this, '\0', sizeof(*this)); } + eu() { really_memzero_this(this); } ~eu() = default; eu(const eu&) = default; eu& operator = (const eu&) = default; @@ -181,7 +181,7 @@ struct effect_t dumb_ptr body; } e_call; - e0() { memset(this, '\0', sizeof(*this)); } + e0() { really_memzero_this(this); } ~e0() = default; e0(const e0&) = default; e0& operator = (const e0&) = default; @@ -218,7 +218,7 @@ struct spellguard_t dumb_ptr s_catalysts; dumb_ptr s_alt; /* either `next' or `s.s_alt' */ effect_set_t s_effect; - su() { memset(this, '\0', sizeof(*this)); } + su() { really_memzero_this(this); } ~su() = default; su(const su&) = default; su& operator = (const su&) = default; @@ -340,10 +340,10 @@ struct cont_activation_record_t dumb_ptr old_actualpa; } c_proc; - cu() { memset(this, '\0', sizeof(*this)); } - ~cu() {} - cu(const cu&) = delete; - cu& operator = (const cu&) = delete; + cu() { really_memzero_this(this); } + ~cu() = default; + cu(const cu&) = default; + cu& operator = (const cu&) = default; } c; CONT_STACK ty; }; -- cgit v1.2.3-70-g09d2