summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2010-01-29 12:12:39 (GMT)
committerJoão Abecasis <joao@trolltech.com>2010-01-29 12:12:39 (GMT)
commit57f72b0c2c2f717b267518da7f03dd08576c4df4 (patch)
tree4eb5a5795008e0a3d2f7aa296ee22b5505f28e01
parentc43400792b637c744ca840a4ecb339ffdb27c604 (diff)
downloadQt-57f72b0c2c2f717b267518da7f03dd08576c4df4.zip
Qt-57f72b0c2c2f717b267518da7f03dd08576c4df4.tar.gz
Qt-57f72b0c2c2f717b267518da7f03dd08576c4df4.tar.bz2
QDirPrivate::Data: remove needless clear()-s in constructors
Initialize members with default values in constructor, instead. Merge-request: 445 Reviewed-by: João Abecasis <joao@trolltech.com>
-rw-r--r--src/corelib/io/qdir.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index f465e73..3a04920 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -120,12 +120,12 @@ private:
struct Data {
inline Data()
- : ref(1), fileEngine(0)
- { clear(); }
+ : ref(1), fileEngine(0), listsDirty(1)
+ {}
inline Data(const Data &copy)
: ref(1), path(copy.path), nameFilters(copy.nameFilters), sort(copy.sort),
- filters(copy.filters), fileEngine(0)
- { clear(); }
+ filters(copy.filters), fileEngine(0), listsDirty(1)
+ {}
inline ~Data()
{ delete fileEngine; }
@@ -181,7 +181,6 @@ QDirPrivate::QDirPrivate(QDir *qq, const QDir *copy) : q_ptr(qq)
data = copy->d_func()->data;
} else {
data = new QDirPrivate::Data;
- data->clear();
}
}