From 4b326cb4916d981d48a2997df3d82b6b3b7b6b92 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 7 Jul 2012 22:09:49 +0300 Subject: [PATCH] Use a self-assignment to copy all members --- source/fs/path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.45.2