From dc9e271c130a14e1f8446227238397ddcb34028a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 23 Jan 2018 12:30:24 +0100 Subject: Use a more conventional way of zero-initializing class members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of non- trivial type ‘class SalVisual’") Change-Id: Id9c5a6fa7e084b5abd549c99d07f05f183d56a52 Reviewed-on: https://gerrit.libreoffice.org/48402 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/unx/generic/app/saldisp.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 767cf81aa239..edf8ca53246f 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2374,10 +2374,10 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat return bRet; } -SalVisual::SalVisual() -{ - memset( this, 0, sizeof( SalVisual ) ); -} +SalVisual::SalVisual(): + eRGBMode_(RGB), nRedShift_(0), nGreenShift_(0), nBlueShift_(0), nRedBits_(0), nGreenBits_(0), + nBlueBits_(0) +{} SalVisual::SalVisual( const XVisualInfo* pXVI ) { -- cgit