[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:       Andre =?iso-8859-1?q?W=F6bbeking?= <Woebbeking () kde ! org>
Date:       2008-02-20 7:25:14
Message-ID: 200802200825.15086.Woebbeking () kde ! org
[Download RAW message or body]

On Wednesday 20 February 2008 06:04:24 Matt Rogers wrote:
> Hi,
>
> So, I've been doing some review of decibel and I've seen some stuff like
> this (from kdereview/decibel/src/server/contactmanager.h)
>
> Decibel::ChannelInfo
> contactContactUsingAccount(const uint contact_id, const int account_handle,
>                            const int type, const bool suppress_handler);
>
>
> Most of us know that passing POD by value with a const qualifier is
> kinda silly, since it has next to zero real effect. 

It makes sense in the implementation but not in the API. As compromise we 
could remove the const in the header files but leave them in the source files 
(that is allowed for PODs).


Cheers,
Andre
[prev in list] [next in list] [prev in thread] [next in thread] 

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