]> git.tdb.fi Git - libs/core.git/commitdiff
Use a self-assignment to copy all members
authorMikko Rasa <tdb@tdb.fi>
Sat, 7 Jul 2012 19:09:49 +0000 (22:09 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 7 Jul 2012 19:09:49 +0000 (22:09 +0300)
source/fs/path.cpp

index 241b2f8aeb938493f006d735f36a9f8f4c41e6ec..99bcc8bfe216b13101ce51f077ed12d7efd281d4 100644 (file)
@@ -89,7 +89,7 @@ Path Path::operator/(const Path &p) const
 Path &Path::operator/=(const Path &p)
 {
        if(p.is_absolute())
-               path = p.path;
+               *this = p;
        else
        {
                for(Iterator i=p.begin(); i!=p.end(); ++i)