diff options
author | D G Turner | 2019-12-10 03:52:20 +0000 |
---|---|---|
committer | D G Turner | 2019-12-10 03:52:20 +0000 |
commit | 9dcfe2c09ece2248986af4547e878a07d8ba950f (patch) | |
tree | a59e9eba748353df44e461a753b5e6f48365a703 /engines/teenagent/objects.h | |
parent | 73fd89b17ba8d95993f287fdfb27a5978b23eee2 (diff) | |
download | scummvm-rg350-9dcfe2c09ece2248986af4547e878a07d8ba950f.tar.gz scummvm-rg350-9dcfe2c09ece2248986af4547e878a07d8ba950f.tar.bz2 scummvm-rg350-9dcfe2c09ece2248986af4547e878a07d8ba950f.zip |
TEENAGENT: Fix GCC-9 -Wclass-memaccess Warning
This is another case of a warning from using memset to clear a non-trivial
data structure.
Diffstat (limited to 'engines/teenagent/objects.h')
-rw-r--r-- | engines/teenagent/objects.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h index 1f8a82a66e..fdf0a5ebb1 100644 --- a/engines/teenagent/objects.h +++ b/engines/teenagent/objects.h @@ -205,7 +205,15 @@ struct Walkbox { Rect rect; byte sideHint[4]; - Walkbox() : _base(NULL) { memset(this, 0, sizeof(Walkbox)); } + Walkbox() { + _base = nullptr; + type = 0; + orientation = 0; + // rect cleared by Rect constructor + for (uint i = 0; i < ARRAYSIZE(sideHint); i++) { + sideHint[i] = 0; + } + } void dump(int level = 0) const; void load(byte *src); void save() const; |