[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: Alexander Neundorf <neundorf () kde ! org>
Date: 2008-02-20 17:44:21
Message-ID: 200802201844.21702.neundorf () kde ! org
[Download RAW message or body]
On Wednesday 20 February 2008, 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.
You can't accidentially assign a different value to contact_id in the
implementation. It doesn't change anything for the calling code. I don't see
a problem here, so I'd say this is up to the maintainer.
Alex
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic