< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

RE: [reSIProcate] Minor point: passing shared pointers


Good idea – I’ve committed the changes.

 


From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Alan Stokes
Sent: Tuesday, September 13, 2005 9:15 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] Minor point: passing shared pointers

 

There are fair number of places in the code where SharedPtrs are being passed by reference, when actually const reference would be more appropriate. For example DialogUsageManager.hxx has
      void setMasterProfile(SharedPtr<MasterProfile>& masterProfile);
instead of
      void setMasterProfile(SharedPtr<MasterProfile> const & masterProfile);

(You aren't going to modify my copy of the SharedPtr, only make your own copy of it.)

I came across this because I tend to make absolutely everything I can const - and if I have a const SharedPtr I can't pass it to one of these functions.

- Alan