Kaydet (Commit) d4165675 authored tarafından David Tardon's avatar David Tardon

protect against self-assignment

Change-Id: Ic7b329fb0d2b5820dac73a9b92a857bb2edd49c8
üst 2ceba706
...@@ -336,11 +336,14 @@ SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal ) ...@@ -336,11 +336,14 @@ SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal )
inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy )
{ {
nSetValue = rCpy.nSetValue; if ( &rCpy != this)
nMyLevel = rCpy.nMyLevel; {
bStartNum = rCpy.bStartNum; nSetValue = rCpy.nSetValue;
nMyLevel = rCpy.nMyLevel;
bStartNum = rCpy.bStartNum;
memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) ); memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) );
}
return *this; return *this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment