diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-10-15 01:57:12 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-17 09:53:42 +0200 |
commit | d51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch) | |
tree | fd1ab208d49e85371fc9bb321539ce137bdaf719 /sfx2/source/appl/shutdowniconw32.cxx | |
parent | c8eaadb5d70f42723517bb028f363e37726be256 (diff) |
Remove some memset calls
Replace them with default initialization or calloc
Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1
Reviewed-on: https://gerrit.libreoffice.org/80805
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source/appl/shutdowniconw32.cxx')
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index f5e836dfbc5a..deea7b4373f5 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -90,8 +90,7 @@ typedef struct tagMYITEM static void addMenuItem( HMENU hMenu, UINT id, UINT iconId, const OUString& text, int& pos, bool bOwnerdraw, const OUString& module ) { - MENUITEMINFOW mi; - memset( &mi, 0, sizeof( mi ) ); + MENUITEMINFOW mi = {}; mi.cbSize = sizeof( mi ); if( id == static_cast<UINT>( -1 ) ) @@ -218,9 +217,8 @@ static void deleteSystrayMenu( HMENU hMenu ) if( !hMenu || !IsMenu( hMenu )) return; - MENUITEMINFOW mi; + MENUITEMINFOW mi = {}; int pos=0; - memset( &mi, 0, sizeof( mi ) ); mi.cbSize = sizeof( mi ); mi.fMask = MIIM_DATA; @@ -552,8 +550,7 @@ void OnMeasureItem(HWND hwnd, LPMEASUREITEMSTRUCT lpmis) HDC hdc = GetDC(hwnd); SIZE size; - NONCLIENTMETRICSW ncm; - memset(&ncm, 0, sizeof(ncm)); + NONCLIENTMETRICSW ncm = {}; ncm.cbSize = sizeof(ncm); SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); @@ -639,8 +636,7 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis) x += cx + 4; // space for icon aRect.left = x; - NONCLIENTMETRICSW ncm; - memset(&ncm, 0, sizeof(ncm)); + NONCLIENTMETRICSW ncm = {}; ncm.cbSize = sizeof(ncm); SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); |