KSycocaFactory question
Alexander Neundorf
neundorf at kde.org
Wed Dec 7 22:55:58 GMT 2005
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 at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org - http://www.kde.org
alex at neundorf.net - http://www.neundorf.net
More information about the kde-core-devel
mailing list