diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-02-05 13:29:53 (GMT) |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-02-05 13:47:07 (GMT) |
commit | cc1f88b869f23bb2855c1ada0fc6187ca21413b6 (patch) | |
tree | 0785b2ccd3fde321a3a514d9d636df546ee59649 /src/corelib | |
parent | 919a8b360950718c68b4da68aeb22a402f99ae3b (diff) | |
download | Qt-cc1f88b869f23bb2855c1ada0fc6187ca21413b6.zip Qt-cc1f88b869f23bb2855c1ada0fc6187ca21413b6.tar.gz Qt-cc1f88b869f23bb2855c1ada0fc6187ca21413b6.tar.bz2 |
A few trivial optimizations
Don't use QHash/QMap::values/keys unnecessarily.
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_inotify.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_kqueue.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index a7dc8fa..4740a89 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -235,7 +235,7 @@ QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd) QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() { - foreach (int id, pathToID.values()) + foreach (int id, pathToID) inotify_rm_watch(inotifyFd, id < 0 ? -id : id); ::close(inotifyFd); diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp index f088ded..8396481 100644 --- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp +++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp @@ -109,7 +109,7 @@ QKqueueFileSystemWatcherEngine::~QKqueueFileSystemWatcherEngine() close(kqpipe[0]); close(kqpipe[1]); - foreach (int id, pathToID.values()) + foreach (int id, pathToID) ::close(id < 0 ? -id : id); } |