From 194e158beb73be8d5cf879086dc3a002ff4c8809 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 23 Dec 2015 00:15:30 +0100 Subject: QtCore: eradicate all Q_FOREACH loops [io] Saves more than 1KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I1a974e903bc8352af800fa26edae0194c1e51705 Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemwatcher_inotify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qfilesystemwatcher_inotify.cpp') diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index 5e9e19aab1..3847e70a1c 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -246,7 +246,7 @@ QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd, QObject QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() { notifier.setEnabled(false); - foreach (int id, pathToID) + for (int id : qAsConst(pathToID)) inotify_rm_watch(inotifyFd, id < 0 ? -id : id); ::close(inotifyFd); -- cgit v1.2.3