From 69452ccbe91514c7f3f34ee980813ba45bc75435 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 25 Aug 2019 08:12:31 +0100 Subject: ZVISION: Fix GCC Compiler Warnings These were from memset usage on non-trivial structures, but were fixed by directly clearing the Common::Point array. --- engines/zvision/graphics/render_table.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/zvision/graphics/render_table.cpp b/engines/zvision/graphics/render_table.cpp index 815a1b0f9d..b0c0b92423 100644 --- a/engines/zvision/graphics/render_table.cpp +++ b/engines/zvision/graphics/render_table.cpp @@ -141,7 +141,13 @@ void RenderTable::generateRenderTable() { } void RenderTable::generatePanoramaLookupTable() { - memset(_internalBuffer, 0, _numRows * _numColumns * sizeof(uint16)); + for (uint y = 0; y < _numRows; y++) { + for (uint x = 0; x < _numColumns; x++) { + uint32 index = y * _numColumns + x; + _internalBuffer[index].x = 0; + _internalBuffer[index].y = 0; + } + } float halfWidth = (float)_numColumns / 2.0f; float halfHeight = (float)_numRows / 2.0f; -- cgit v1.2.3