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

List:       kmail-devel
Subject:    Re: Patch: Optimizations
From:       Stephan Kulow <coolo () kde ! org>
Date:       2001-04-18 9:47:45
[Download RAW message or body]

Am Mittwoch, 18. April 2001 10:38 schrieb Andreas Gungl:
> Am Mittwoch 18 April 2001 10:12 schrieb Stephan Kulow:
> > Am Mittwoch, 18. April 2001 03:50 schrieb Don Sanders:
> > > Sam and I have been working on optimizations, specifically reducing
> > > memory use and time taken to display folders containing many messages.
> > >
> > > I don't expect anyone to look at this patch, but I would like people to
> > > know what were up too.
> > >
> > > It's a pretty big patch and it's going to take awhile to fix all the
> > > bugs but the gains made are substantial.
> >
> > You've done it again :)
> >
> >  +void KMMsgInfo::setStatus(const KMMsgStatus aStatus)
> >
> > KMMsgStatus is an enum and there is no point to declare the value of it
> > as const. This only makes sense for pointers and references. For values
> > it makes absolutly no sense - until someone prooves the opposite to me.
>
> IIRC the compiler should warn you if you try to manipulate a parameter
> declared as const within the method. So there is no influence to the
> runtime, but it gives some additional information to persons using the
> method without wanting to completely go through the sources.
If setStatus changes aStatus or not is of no interest to noone. The parameter
value is copied into a local variable on the stack, this variable is there 
and can be changed or it can be read only. The caller can't do anything using
the information that it's read only, if you still want the caller to know, 
write API docu :)

Greetings, Stephan

-- 
People in cars cause accidents. Accidents in cars cause people.

_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail

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

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