On Sat, Dec 27, 2014 at 5:54 AM, Karl Tomlinson <[email protected]> wrote: > Aryeh Gregor writes: > >> Do we have a better convention for an in/out parameter that's a >> pointer to a refcounted class? editor uses this convention in a >> number of functions for "pass me a node/pointer pair as input, and >> I'll update it to the new value while I'm at it." If there's a good >> substitute for this, let me know and I'll use it in the future when >> cleaning up editor code. > > nsRefPtr<T>*
The advantage being that it's clear at the call site that the parameter can be modified by the caller, right? But on the other hand, the compiler won't help you catch when you're passing a null parameter. _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

