summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-10-15 01:57:12 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-10-17 09:53:42 +0200
commitd51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch)
treefd1ab208d49e85371fc9bb321539ce137bdaf719 /tools/source
parentc8eaadb5d70f42723517bb028f363e37726be256 (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 'tools/source')
-rw-r--r--tools/source/ref/globname.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 0a87bcf17b5d..6cbff020669c 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -27,11 +27,6 @@
#include <tools/globname.hxx>
// ImpSvGlobalName ------------------------------------------------------------
-ImpSvGlobalName::ImpSvGlobalName()
-{
- memset( &szData, 0, sizeof( szData ) );
-}
-
ImpSvGlobalName::ImpSvGlobalName( const ImpSvGlobalName & rObj )
: szData(rObj.szData)
{
@@ -80,8 +75,7 @@ SvGlobalName::SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
SvGlobalName::SvGlobalName( const css::uno::Sequence < sal_Int8 >& aSeq )
{
// create SvGlobalName from a platform independent representation
- SvGUID aResult;
- memset( &aResult, 0, sizeof( aResult ) );
+ SvGUID aResult = {};
if ( aSeq.getLength() == 16 )
{
aResult.Data1 = ( ( ( ( ( static_cast<sal_uInt8>(aSeq[0]) << 8 ) + static_cast<sal_uInt8>(aSeq[1]) ) << 8 ) + static_cast<sal_uInt8>(aSeq[2]) ) << 8 ) + static_cast<sal_uInt8>(aSeq[3]);
@@ -206,8 +200,7 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
pStr++;
}
- sal_Int8 szRemain[ 8 ];
- memset( szRemain, 0, sizeof( szRemain ) );
+ sal_Int8 szRemain[ 8 ] = {};
pStr++;
for( i = 0; i < 16; i++ )
{