From c3c30e16a2bb5ab9236946aa6c48ca02ef2afa08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 26 Aug 2010 13:47:33 +0200 Subject: QDir::operator= simplification With the recent changes to QDirPrivate and how d_ptr is now a QSharedDataPointer, we no longer need to worry about self-assignment, as that is already handled by the d_ptr. Simplifying code here. Reviewed-by: Prasanth Ullattil --- src/corelib/io/qdir.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 7c38ecf..b35cd2b 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1634,9 +1634,6 @@ bool QDir::operator==(const QDir &dir) const */ QDir &QDir::operator=(const QDir &dir) { - if (this == &dir) - return *this; - d_ptr = dir.d_ptr; return *this; } -- cgit v0.12