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

List:       kde-core-devel
Subject:    Re: passing POD by value with const qualifiers. Silly or not?
From:       André_Wöbbeking <Woebbeking () kde ! org>
Date:       2008-02-22 20:27:43
Message-ID: 200802222127.43841.Woebbeking () kde ! org
[Download RAW message or body]

On Friday 22 February 2008, Stefan Teleman wrote:
> On Fri, Feb 22, 2008 at 3:00 PM, André Wöbbeking <Woebbeking@kde.org> 
wrote:
> > On Friday 22 February 2008, Stefan Teleman wrote:
> > > On Fri, Feb 22, 2008 at 2:41 PM, André Wöbbeking
> > > <Woebbeking@kde.org>
> >
> >  wrote:
> >  > >  As I wrote before, it isn't useful in the API.
> >  >
> >  > It is not useful at all, anywhere. What does it do ?
> >
> >  Well, in the implementation you can't change the parameter by
> > mistake (I mean the local copy here, not the callers one). I prefer
> > const for variables that don't change.
>
> And if you change it (intentionally or not), what happens ? Anything
> ?

If you change something not intentionally I'd probably call it a bug.

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

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