From: Mikko Rasa Date: Sat, 7 Jul 2012 19:09:49 +0000 (+0300) Subject: Use a self-assignment to copy all members X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=4b326cb4916d981d48a2997df3d82b6b3b7b6b92 Use a self-assignment to copy all members --- diff --git a/source/fs/path.cpp b/source/fs/path.cpp index 241b2f8..99bcc8b 100644 --- a/source/fs/path.cpp +++ b/source/fs/path.cpp @@ -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)