Removed the eternal ref bits, as no one uses it & we don't need it.
This commit is contained in:
parent
ca77b4fd02
commit
b36b0e091f
2 changed files with 4 additions and 8 deletions
|
@ -224,23 +224,19 @@ public:
|
|||
MUST be at least of the size of the original matrix. */
|
||||
ScMatrix* CloneAndExtend( SCSIZE nNewCols, SCSIZE nNewRows, DensityType eType) const;
|
||||
|
||||
/// Disable refcounting forever, may only be deleted via Delete() afterwards.
|
||||
inline void SetEternalRef() { nRefCnt = ULONG_MAX; }
|
||||
inline bool IsEternalRef() const { return nRefCnt == ULONG_MAX; }
|
||||
inline void IncRef() const
|
||||
{
|
||||
if ( !IsEternalRef() )
|
||||
++nRefCnt;
|
||||
++nRefCnt;
|
||||
}
|
||||
inline void DecRef() const
|
||||
{
|
||||
if ( nRefCnt > 0 && !IsEternalRef() )
|
||||
if ( nRefCnt > 0 )
|
||||
if ( --nRefCnt == 0 )
|
||||
delete this;
|
||||
}
|
||||
inline void Delete()
|
||||
{
|
||||
if ( nRefCnt == 0 || IsEternalRef() )
|
||||
if ( nRefCnt == 0 )
|
||||
delete this;
|
||||
else
|
||||
--nRefCnt;
|
||||
|
|
|
@ -772,7 +772,7 @@ ScMatrix* ScMatrix::Clone( DensityType eType) const
|
|||
|
||||
ScMatrix* ScMatrix::CloneIfConst()
|
||||
{
|
||||
return (pImpl->IsImmutable() || IsEternalRef()) ? Clone() : this;
|
||||
return pImpl->IsImmutable() ? Clone() : this;
|
||||
}
|
||||
|
||||
void ScMatrix::SetImmutable( bool bVal )
|
||||
|
|
Loading…
Reference in a new issue