From df965c3e3fbde6fc6b300a4ede603eb6271f11a4 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Tue, 23 Nov 2010 15:43:06 +0100 Subject: QHash is a bit faster than QMap and thus preferable if sorting by the key is unneeded Merge-request: 2501 Reviewed-by: Denis Dzyubenko --- src/corelib/io/qfilesystemwatcher_inotify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index dc18ae7..25ff2b6 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -356,7 +356,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify() char *at = buffer.data(); char * const end = at + buffSize; - QMap eventForId; + QHash eventForId; while (at < end) { inotify_event *event = reinterpret_cast(at); @@ -368,7 +368,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify() at += sizeof(inotify_event) + event->len; } - QMap::const_iterator it = eventForId.constBegin(); + QHash::const_iterator it = eventForId.constBegin(); while (it != eventForId.constEnd()) { const inotify_event &event = **it; ++it; -- cgit v0.12