diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-11 12:37:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-11 14:33:34 +0000 |
commit | a0d5d57386f4c5ebf940d77b490b987c63a36c07 (patch) | |
tree | ad5801e65516f49ddfbe2895f2f635dc9dcbbd07 /idl | |
parent | ea334ca0c99dfb79c4535197335f69278cd68cfc (diff) |
coverity#707930 Uninitialized scalar field
Change-Id: Ib652a8a1f81dde1f5ac3b6b7b73376c73777247c
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/hash.hxx | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index ee3ba12d48cf..6a29ef5f3ba9 100644 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -56,24 +56,31 @@ friend class SvStringHashTable; sal_uLong nValue; sal_Bool bHasId; public: - SvStringHashEntry() : bHasId( sal_False ) {;} - SvStringHashEntry( const OString& rName, sal_uInt32 nIdx ) - : aName( rName ) - , nHashId( nIdx ) - , nValue( 0 ) - , bHasId( sal_True ) {} - ~SvStringHashEntry(); - - const OString& GetName() const { return aName; } - sal_Bool HasId() const { return bHasId; } - sal_uInt32 GetId() const { return nHashId; } + SvStringHashEntry() + : nHashId(0) + , nValue(0) + , bHasId(false) + { + } + SvStringHashEntry( const OString& rName, sal_uInt32 nIdx ) + : aName(rName) + , nHashId(nIdx) + , nValue(0) + , bHasId(true) + { + } + ~SvStringHashEntry(); + + const OString& GetName() const { return aName; } + sal_Bool HasId() const { return bHasId; } + sal_uInt32 GetId() const { return nHashId; } void SetValue( sal_uLong n ) { nValue = n; } sal_uLong GetValue() const { return nValue; } - sal_Bool operator == ( const SvStringHashEntry & rRef ) + sal_Bool operator == ( const SvStringHashEntry & rRef ) { return nHashId == rRef.nHashId; } - sal_Bool operator != ( const SvStringHashEntry & rRef ) + sal_Bool operator != ( const SvStringHashEntry & rRef ) { return ! operator == ( rRef ); } SvStringHashEntry & operator = ( const SvStringHashEntry & rRef ) { SvRefBase::operator=( rRef ); |