diff options
author | João Abecasis <joao@abecasis.name> | 2009-07-22 11:39:12 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-07-22 12:36:18 (GMT) |
commit | 51f4d0c1926335977c2aa814746a61b194d2f9d1 (patch) | |
tree | 823d7f3e989a6f94ee526d501208fdd5e9e4506e /src | |
parent | 90a3286841255132c96a2481a76c8b80c0728750 (diff) | |
download | Qt-51f4d0c1926335977c2aa814746a61b194d2f9d1.zip Qt-51f4d0c1926335977c2aa814746a61b194d2f9d1.tar.gz Qt-51f4d0c1926335977c2aa814746a61b194d2f9d1.tar.bz2 |
Prefer mutable over const_cast.
Reviewed-by: Simon Hausmann
Reviewed-by: Frans Englich
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qresource_iterator.cpp | 5 | ||||
-rw-r--r-- | src/corelib/io/qresource_iterator_p.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/io/qresource_iterator.cpp b/src/corelib/io/qresource_iterator.cpp index 7e22600..11f4acf 100644 --- a/src/corelib/io/qresource_iterator.cpp +++ b/src/corelib/io/qresource_iterator.cpp @@ -73,9 +73,8 @@ bool QResourceFileEngineIterator::hasNext() const return false; // Initialize and move to the next entry. - QResourceFileEngineIterator *that = const_cast<QResourceFileEngineIterator *>(this); - that->entries = resource.children(); - that->index = 0; + entries = resource.children(); + index = 0; } return index < entries.size(); diff --git a/src/corelib/io/qresource_iterator_p.h b/src/corelib/io/qresource_iterator_p.h index b5e8382..5165157 100644 --- a/src/corelib/io/qresource_iterator_p.h +++ b/src/corelib/io/qresource_iterator_p.h @@ -71,8 +71,8 @@ public: QString currentFileName() const; private: - QStringList entries; - int index; + mutable QStringList entries; + mutable int index; }; QT_END_NAMESPACE |