[reSIProcate] Minor point: passing shared pointers

Scott Godin slgodin at icescape.com
Tue Sep 13 09:51:57 CDT 2005


Good idea - I've committed the changes.

 

________________________________

From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of Alan
Stokes
Sent: Tuesday, September 13, 2005 9:15 AM
To: resiprocate-devel at list.sipfoundry.org
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





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20050913/fe5e5cd6/attachment.htm>


More information about the resiprocate-devel mailing list