From kde-core-devel Wed Feb 20 07:25:14 2008 From: Andre =?iso-8859-1?q?W=F6bbeking?= Date: Wed, 20 Feb 2008 07:25:14 +0000 To: kde-core-devel Subject: Re: passing POD by value with const qualifiers. Silly or not? Message-Id: <200802200825.15086.Woebbeking () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=120349235508205 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