Inappropriate passing of shared pointers by non-const reference
Brought to you by:
andrewgschmidt,
nsteiner
Matt Calderon points out that various functions (i.e. torc::physical::Circuit::addInstance()) take non-const shared pointer references as parameters. This is dangerous because it can lead to incorrect reference counting by the shared pointer.
Based on the discussion in http://stackoverflow.com/questions/3310737/shared-ptr-by-reference-or-by-value and http://stackoverflow.com/questions/8385457/should-i-pass-a-shared-ptr-by-reference, the shared pointers are now passed as const shared pointer references.