Mailinglist Archive: zypp-devel (68 mails)

< Previous Next >
Re: [zypp-devel] Things TODO in CacheStore
  • From: Jan Kupec <jkupec@xxxxxxx>
  • Date: Fri, 25 May 2007 12:16:07 +0200
  • Message-id: <4656B767.3010809@xxxxxxx>
Michael Andres wrote:
> PLEASE if you touche the interface,fix this as well:
> 
>   void consumePackageAtom ( const data::RecordId &catalog_id, 
>                             const data::PackageAtom_Ptr & ) = 0;
> 
>   void consumeMessage     ( const data::RecordId &catalog_id, 
>                             data::Message_Ptr ) = 0;
> 
>   ...
> 
> All methods doing the same, just with different kinds of data pointer
> should use the same signature (for the 2nd arg).
> 
> If you extend an existing interface, try to adapt it's style. Pass either 
> by "value" or by "const &".

This is my fault. I introduced those const &.

What's better here? Passing the pointer by value or reference? I used
const & to declare constness (shell we possibly modify the object?) and
to avoid copying.

j.
-- 
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups