[Kstars-devel] branches/kstars/summer/kstars/kstars
Prakash Mohan
prak902000 at gmail.com
Fri Jul 24 21:52:19 CEST 2009
> But why do you need pointer to modify QList. You can modify it via reference
> as well.
>
> sessionList returned refrerence to QList, not copy of QList. Compare:
>
> // Return reference
> QList<SkyObject*>& sessionList() { return m_SessionList; }
> // Return copy of object
> QList<SkyObject*> sessionList() { return m_SessionList; }
>
> I just prefer references to pointers.
Oh, I din't know that. Thanks for the correction. It is indeed easier
to pass it by reference.
--
Prakash
Undergraduate Student
Department of Aerospace Engineering
Indian Institute Of Technology Madras
More information about the Kstars-devel
mailing list