]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/stat.cpp
Use nullptr instead of 0 for pointers
[libs/core.git] / source / fs / stat.cpp
index f4566ae8b6ef8363cd68f709f2d66924137a58a2..773cdefbf8743ce08b6815d6a5115030944b46d1 100644 (file)
@@ -7,20 +7,6 @@ using namespace std;
 namespace Msp {
 namespace FS {
 
-Stat::Private::Private():
-       owner_id(0),
-       group_id(0)
-{ }
-
-
-Stat::Stat():
-       exists(false),
-       type(UNKNOWN),
-       size(0),
-       alloc_size(0),
-       priv(0)
-{ }
-
 Stat::Stat(const Stat &other):
        exists(other.exists),
        type(other.type),
@@ -28,7 +14,7 @@ Stat::Stat(const Stat &other):
        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)
@@ -40,7 +26,7 @@ Stat &Stat::operator=(const Stat &other)
        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;
 }
@@ -50,14 +36,14 @@ Stat::~Stat()
        delete priv;
 }
 
-const std::string &Stat::get_owner() const
+const string &Stat::get_owner() const
 {
        if(priv && owner_info.owner.empty())
                priv->fill_owner_info(owner_info);
        return owner_info.owner;
 }
 
-const std::string &Stat::get_group() const
+const string &Stat::get_group() const
 {
        if(priv && owner_info.group.empty())
                priv->fill_owner_info(owner_info);