mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-29 07:25:53 +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)
|
||||
{
|
||||
if (_pImpl) _pImpl->release();
|
||||
_pImpl = it._pImpl;
|
||||
if (_pImpl)
|
||||
if (&it != this)
|
||||
{
|
||||
_pImpl->duplicate();
|
||||
_path = it._path;
|
||||
_file = _path;
|
||||
if (_pImpl) _pImpl->release();
|
||||
_pImpl = it._pImpl;
|
||||
if (_pImpl)
|
||||
{
|
||||
_pImpl->duplicate();
|
||||
_path = it._path;
|
||||
_file = _path;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user