passing POD by value with const qualifiers. Silly or not?

Matt Rogers mattr at kde.org
Wed Feb 20 05:04:24 GMT 2008


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. I've had a discussion with
Decibel's developer about this and he's not inclined to change it (his main 
argument, IIRC, was that it helps define the interface for the function) and 
has actually reverted the changes I made to get rid of things like this when 
porting my commits from branches/work/decibel to playground/pim/decibel.

Do we allow code like this to go into our main modules? Do we care? Is
this one of those maintainer's perogative kind of things? I'll go along
with the majority opinion on this one, hence the request for feedback.

Thanks
--
Matt





More information about the kde-core-devel mailing list