mirror of
https://github.com/pocoproject/poco.git
synced 2025-06-03 21:37:15 +02:00
fix assignment operator
This commit is contained in:
parent
eeb64cc340
commit
2018a698ba
@ -72,13 +72,16 @@ DirectoryIterator::~DirectoryIterator()
|
|||||||
|
|
||||||
DirectoryIterator& DirectoryIterator::operator = (const DirectoryIterator& it)
|
DirectoryIterator& DirectoryIterator::operator = (const DirectoryIterator& it)
|
||||||
{
|
{
|
||||||
if (_pImpl) _pImpl->release();
|
if (&it != this)
|
||||||
_pImpl = it._pImpl;
|
|
||||||
if (_pImpl)
|
|
||||||
{
|
{
|
||||||
_pImpl->duplicate();
|
if (_pImpl) _pImpl->release();
|
||||||
_path = it._path;
|
_pImpl = it._pImpl;
|
||||||
_file = _path;
|
if (_pImpl)
|
||||||
|
{
|
||||||
|
_pImpl->duplicate();
|
||||||
|
_path = it._path;
|
||||||
|
_file = _path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user