LLEventDetail::visit_and_connect() promised special treatment for the specific case when an LLEventPump::listen() listener was composed of (possibly nested) boost::bind() objects storing boost::weak_ptr values -- specifically boost::bind() rather than std::bind or lambdas, specifically boost::weak_ptr rather than std::weak_ptr. Outside of self-tests, it does not appear that anyone actually uses that support. There is good reason not to: it's a silent side effect of a complicated compile-time inspection that could be silently derailed by use of std::bind() or a lambda or a std::weak_ptr. Can you be sure you've engaged that promise? How? A more robust guarantee can be achieved by storing an LLTempBoundConnection in the transient object itself. When the object is destroyed, the listener is disconnected. Normal C++ rules around object destruction guarantee it. This idiom is widely used. There are a couple good reasons to remove the visit_and_connect() machinery: * boost::bind() and boost::weak_ptr do not constitute the wave of the future. Preferring those constructs to lambdas and std::weak_ptr penalizes new code, whether by silently failing or by discouraging use of modern idioms. * The visit_and_connect() machinery was always complicated, and apparently never very robust. Most of its promised features have been commented out over the years. Making the code base simpler, clearer and more maintainable is always a useful effect. LLEventDetail::visit_and_connect() was also used by the four LLNotificationChannelBase::connectMumble() methods. Streamline those as well. Of course, remove related test code. |
||
|---|---|---|
| debian | ||
| doc | ||
| etc | ||
| indra | ||
| scripts | ||
| .clang-format | ||
| .gitignore | ||
| .hgtags | ||
| BuildParams | ||
| README.md | ||
| autobuild.xml | ||
| build.sh | ||
README.md
Second Life Viewer
This project manages the source code for the Second Life Viewer.
This source is available as open source; for details on licensing, see the licensing page on the Second Life wiki
For information on how to use and contribute to this, see the open source portal on the wiki.
To download the current default version, visit the download page. For even newer versions try the Alternate Viewers page