summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-08-26 11:47:33 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-08-27 13:47:11 (GMT)
commit1b201e0857d8232eeb1c25942c4fad9360cc11c3 (patch)
treea635516c68fe60c82f3d829108fc3072fc61d550
parent710258ee0ab068bb713edc8d952293cf810a206d (diff)
downloadQt-1b201e0857d8232eeb1c25942c4fad9360cc11c3.zip
Qt-1b201e0857d8232eeb1c25942c4fad9360cc11c3.tar.gz
Qt-1b201e0857d8232eeb1c25942c4fad9360cc11c3.tar.bz2
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
-rw-r--r--src/corelib/io/qdir.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 64eea23..3587243 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;
}