[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/pigment
From: Cyrille Berger <cyb () lepi ! org>
Date: 2010-08-13 21:54:54
Message-ID: 20100813215454.C24AAAC867 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1163366 by berger:
reduce the function to one line, as suggested by Pino
M +1 -10 KoColorSpaceRegistry.cpp
--- trunk/koffice/libs/pigment/KoColorSpaceRegistry.cpp #1163365:1163366
@@ -178,19 +178,10 @@
const KoColorProfile * KoColorSpaceRegistry::profileByName(const QString & _name) const
{
- QString name = _name;
QReadLocker l(&d->registrylock);
- if (d->profileAlias.find(name) != d->profileAlias.end()) {
- name = d->profileAlias[name];
+ return d->profileMap.value( d->profileAlias.value(_name, _name) , 0);
}
- if (d->profileMap.find(name) == d->profileMap.end()) {
- return 0;
- }
-
- return d->profileMap[name];
-}
-
QList<const KoColorProfile *> KoColorSpaceRegistry::profilesFor(const QString &id) const
{
return profilesFor(d->colorsSpaceFactoryRegistry.value(id));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic