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 /include/editeng | |
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 'include/editeng')
-rw-r--r-- | include/editeng/numitem.hxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index 7757948a54aa..777f877f0ce5 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -312,11 +312,11 @@ public: class SvxNodeNum { - sal_uInt16 nLevelVal[ SVX_MAX_NUM ]; // Numbers of all levels - sal_uInt8 nMyLevel; // Current Level + sal_uInt16 nLevelVal[ SVX_MAX_NUM ] = {}; // Numbers of all levels + sal_uInt8 nMyLevel = 0; // Current Level public: - explicit inline SvxNodeNum(); + explicit inline SvxNodeNum() = default; inline SvxNodeNum& operator=( const SvxNodeNum& rCpy ); sal_uInt8 GetLevel() const { return nMyLevel; } @@ -326,12 +326,6 @@ public: sal_uInt16* GetLevelVal() { return nLevelVal; } }; -SvxNodeNum::SvxNodeNum() - : nMyLevel( 0 ) -{ - memset( nLevelVal, 0, sizeof( nLevelVal ) ); -} - inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) { if ( &rCpy != this) |