forked from Mirrors/openclonk
Add DirectoryIterator & DirectoryIterator::operator = (const DirectoryIterator &)
Because every class with pointer members should have one.
parent
24fe22faff
commit
3bbf7c6c38
|
@ -849,6 +849,14 @@ DirectoryIterator::DirectoryIterator(const DirectoryIterator &other)
|
|||
{
|
||||
++p->ref;
|
||||
}
|
||||
|
||||
DirectoryIterator & DirectoryIterator::operator = (const DirectoryIterator & other)
|
||||
{
|
||||
p = other.p; iter = other.iter;
|
||||
++p->ref;
|
||||
return *this;
|
||||
}
|
||||
|
||||
DirectoryIterator::~DirectoryIterator()
|
||||
{
|
||||
if (--p->ref == 0)
|
||||
|
|
|
@ -126,6 +126,7 @@ class DirectoryIterator
|
|||
public:
|
||||
DirectoryIterator(const char * dirname);
|
||||
DirectoryIterator();
|
||||
DirectoryIterator & operator = (const DirectoryIterator &);
|
||||
DirectoryIterator(const DirectoryIterator &);
|
||||
~DirectoryIterator();
|
||||
|
||||
|
|
Loading…
Reference in New Issue