alloc_size(other.alloc_size),
mtime(other.mtime),
owner_info(other.owner_info),
- priv(other.priv ? new Private(*other.priv) : 0)
+ priv(other.priv ? new Private(*other.priv) : nullptr)
{ }
Stat &Stat::operator=(const Stat &other)
{
+ if(&other==this)
+ return *this;
+
exists = other.exists;
type = other.type;
size = other.size;
mtime = other.mtime;
owner_info = other.owner_info;
delete priv;
- priv = (other.priv ? new Private(*other.priv) : 0);
+ priv = (other.priv ? new Private(*other.priv) : nullptr);
return *this;
}