mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-31 00:04:36 +02:00
fix assignment operator
This commit is contained in:
parent
eeb64cc340
commit
2018a698ba
@ -72,6 +72,8 @@ DirectoryIterator::~DirectoryIterator()
|
|||||||
|
|
||||||
DirectoryIterator& DirectoryIterator::operator = (const DirectoryIterator& it)
|
DirectoryIterator& DirectoryIterator::operator = (const DirectoryIterator& it)
|
||||||
{
|
{
|
||||||
|
if (&it != this)
|
||||||
|
{
|
||||||
if (_pImpl) _pImpl->release();
|
if (_pImpl) _pImpl->release();
|
||||||
_pImpl = it._pImpl;
|
_pImpl = it._pImpl;
|
||||||
if (_pImpl)
|
if (_pImpl)
|
||||||
@ -80,6 +82,7 @@ DirectoryIterator& DirectoryIterator::operator = (const DirectoryIterator& it)
|
|||||||
_path = it._path;
|
_path = it._path;
|
||||||
_file = _path;
|
_file = _path;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user