[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdeui/icons
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2010-05-29 8:36:29
Message-ID: 20100529083629.GA6089 () ugly ! local
[Download RAW message or body]

On Sat, May 29, 2010 at 05:05:49AM +0200, Michael Pyne wrote:
> SVN commit 1131793 by mpyne:
> 
> Use QSet instead of QMap where it is more appropriate.
> 
> --- trunk/KDE/kdelibs/kdeui/icons/kicontheme.cpp #1131792:1131793
> @@ -207,7 +208,7 @@
>          for (itDir=themeDirs.constBegin(); itDir!=themeDirs.constEnd(); ++itDir) {
>              const QString currentDir(*itDir + *it + '/');

>              if (KStandardDirs::exists(currentDir) && !addedDirs.contains(currentDir)) {
>
you should do the duplicate check first, as it is a lot less expensive
than the existence test. and you could cache negative hits as well then.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic