Commit Graph

10 Commits

Author SHA1 Message Date
Sam Edwards ebe1b0763f express: Allow WeakPointer comparisons to nullptr
This saves us from having to do casts like:
if (foo == (const FooType *)nullptr) {
  ...
}
2018-06-03 16:26:44 -06:00
rdb 9fad3dba60 general: remove macros for compatibility with non-C++11 compilers
Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
2018-05-23 23:33:05 +02:00
rdb 0bb81a43c9 express: make a thread safe weak pointer implementation (#321)
To access a WeakPointerTo in a thread-safe way, use something like this:

    if (auto ptr = weak_ptr.lock()) {
      ..use ptr as regular PointerTo
    }

The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient.  Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.

The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
Chris Brunner c87f384a40 fixes for 32 and 64-bit builds both being able to build 2010-05-28 23:22:43 +00:00
Chris Brunner 547a72053c support for #ifdef WIN64_VC instead of just #ifdev WIN32_VC alone 2010-05-28 21:09:22 +00:00
David Rose fb9c56432a we are now using the modified BSD license 2008-05-28 18:37:20 +00:00
David Rose 7c9997118c support common transforming of shared PartBundles 2007-10-03 21:14:33 +00:00
David Rose 475196cbef robustify WeakPointerTo, publish ConstPointerTo 2005-03-11 19:29:57 +00:00
David Rose 557060cb1d weak pointers, and FadeLODNode fixes for instances/multiple cameras 2004-09-30 21:29:25 +00:00