[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KSycocaFactory question
From: Alexander Neundorf <neundorf () kde ! org>
Date: 2005-12-07 22:55:58
Message-ID: 200512072355.59631.neundorf () kde ! org
[Download RAW message or body]
On Wednesday 07 December 2005 08:02, Thomas Braxton wrote:
> In kdecore/ksycocafactory.cpp:181 we have:
>
> qint32 *offsetList = new qint32[entryCount];
> for(int i = 0; i < entryCount; i++)
> {
> stream >> offsetList[i];
> }
>
> for(int i = 0; i < entryCount; i++)
> {
> KSycocaEntry *newEntry = createEntry(offsetList[i]);
> if (newEntry)
> {
> list.append( KSycocaEntry::Ptr( newEntry ) );
> }
> }
> delete [] offsetList;
>
> couldn't this be changed to:
>
> qint32 offset;
> for(int i = 0; i < entryCount; i++)
> {
> stream >> offset;
> KSycocaEntry *newEntry = createEntry(offset);
> if (newEntry)
> {
> list.append( KSycocaEntry::Ptr( newEntry ) );
> }
> }
I'd say yes, it looks good.
Thanks for spotting this.
Bye
Alex
--
Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de
Home: neundorf@kde.org - http://www.kde.org
alex@neundorf.net - http://www.neundorf.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic