open_toontown_panda3d/panda/src/char
rdb ad3ab3ad21 Define stable ordering for WeakPointerTo for use as map/set key
Currently, the WeakPointerTo comparison operators compare the raw pointers, but this is not useful as it may cause a false equality if one weak pointer in the comparison is expired and points to memory that has since been reused.

Instead, we can define a comparison based on the control block pointer, which exists since the new weak pointer implementation in 0bb81a43c9.  This is implemented in the owner_before method, matching C++11 std::weak_ptr semantics.

I would now recommend deprecating most comparison operators of WeakPointerTo or redefining them to make more sense, ie. comparing equal if they (once) referred to the same object and not if they simply point to the same memory address.  This has not yet been done, though code that uses the comparison operators has been fixed in this commit.

Overloads of std::owner_less have been provided for creating a map or set with Weak(Const)PointerTo keys.
2018-07-30 17:27:09 +02:00
..
character.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
character.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
character.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
characterJoint.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
characterJoint.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
characterJoint.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
characterJointBundle.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
characterJointBundle.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
characterJointBundle.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
characterJointEffect.I Define stable ordering for WeakPointerTo for use as map/set key 2018-07-30 17:27:09 +02:00
characterJointEffect.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
characterJointEffect.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
characterSlider.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
characterSlider.h Various compiler warning fixes 2018-06-12 12:38:07 +02:00
characterVertexSlider.I New file headers, new comment style 2016-02-17 17:47:48 +01:00
characterVertexSlider.cxx New file headers, new comment style 2016-02-17 17:47:48 +01:00
characterVertexSlider.h New file headers, new comment style 2016-02-17 17:47:48 +01:00
config_char.cxx general: Add guards to ensure proper BUILDING_ macros defined 2018-03-25 13:17:52 -06:00
config_char.h New file headers, new comment style 2016-02-17 17:47:48 +01:00
jointVertexTransform.I char: Move JointVertexTransform::_matrix to CharacterJoint 2018-03-10 20:26:02 -07:00
jointVertexTransform.cxx general: Remove `using std::*` from headers 2018-06-14 16:04:49 +02:00
jointVertexTransform.h general: Fully qualify header references into the std namespace 2018-06-07 10:35:12 +02:00
p3char_composite1.cxx rename all Panda-built libraries to begin with libp3 or libpanda 2011-12-06 02:39:21 +00:00
p3char_composite2.cxx rename all Panda-built libraries to begin with libp3 or libpanda 2011-12-06 02:39:21 +00:00