Go to file
Nat Goodspeed e9fe0714ad DRTVWR-418: Xcode 8.3 complains about LLSafeHandle<T> implementation.
The previous LLSafeHandle<T> implementation declares a static data member of
the template class but provides no (generic) definition, relying on particular
specializations to provide the definition. The data member is a function
pointer, which is called in one of the methods to produce a pointer to a
"null" T instance: that is, a dummy instance to be dereferenced in case the
wrapped T* is null.

Xcode 8.3's version of clang is bothered by the call, in a generic method,
through this (usually) uninitialized pointer. It happens that the only
specializations of LLSafeHandle do both provide definitions. I don't know
whether that's formally valid C++03 or not; but I agree with the compiler: I
don't like it.

Instead of declaring a public static function pointer which each
specialization is required to define, add a protected static method to the
template class. This protected static method simply returns a pointer to a
function-static T instance. This is functionally similar to a static
LLPointer<T> set on demand (as in the two specializations), including lazy
instantiation.

Unlike the previous implementation, this approach prohibits a given
specialization from customizing the "null" instance function. Although there
exist reasonable ways to support that (e.g. a related traits template), I
decided not to complicate the LLSafeHandle implementation to make it more
generally useful. I don't really approve of LLSafeHandle, and don't want to
see it proliferate. It's not clear that unconditionally dereferencing
LLSafeHandle<T> is in any way better than conditionally dereferencing
LLPointer<T>. It doesn't even skip the runtime conditional test; it simply
obscures it. (There exist hints in the code that at one time it might have
immediately replaced any wrapped null pointer value with the pointer to the
"null" instance, obviating the test at dereference time, but this is not the
current functionality. Perhaps it was only ever wishful thinking.)

Remove the corresponding functions and static LLPointers from the two classes
that use LLSafeHandle.
2017-03-30 15:39:47 -04:00
debian
…
doc MAINT-7059 [contribution] Import of custom spellcheck dictionary fails silently 2017-01-18 12:20:55 +02:00
etc
…
indra DRTVWR-418: Xcode 8.3 complains about LLSafeHandle<T> implementation. 2017-03-30 15:39:47 -04:00
scripts Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-03-06 14:27:29 -05:00
.hgignore DRTVWR-418: Don't report anything in new build-vc120-{32,64}. 2016-11-23 12:06:31 -05:00
.hgtags Added tag 5.0.3-release for changeset 02c24e9f4f7d 2017-03-13 15:34:01 -04:00
BuildParams Automated merge with ssh://bitbucket.org/lindenlab/viewer64 2016-12-16 08:55:38 -05:00
README.md MAINT-6585: dummy commit to rekick TC 2016-07-27 11:39:20 -07:00
autobuild.xml Fixed for MAINT-7201, MAINT-7202, MAINT-7203 (viewer-embeddedd browser scheme handler was broken) 2017-03-14 15:28:56 -07:00
build.sh DRTVWR-418, SL-619: Update to google_breakpad build 501824 2017-01-06 17:03:35 -05:00

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