all: cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-10-21 11:22:18 +02:00
parent 91c15b2475
commit 9fbe95ad48
16 changed files with 220 additions and 119 deletions
+4 -6
View File
@@ -77,9 +77,7 @@ public:
#endif
noinline void invalidate() {
assertInvariants();
// poison the pointer: point to non-null invalid address
ptr = (pointer) XSPAN_GET_POISON_VOID_PTR();
// ptr = (pointer) (void *) &ptr; // point to self
ptr_invalidate_and_poison(ptr); // point to non-null invalid address
assertInvariants();
}
inline CSelf() { assertInvariants(); }
@@ -126,10 +124,10 @@ public:
}
template <class U>
CSelf<U> type_cast() const {
assertInvariants();
inline CSelf<U> type_cast() const {
typedef CSelf<U> R;
return R(reinterpret_cast<typename R::pointer>(ptr));
typedef typename R::pointer rpointer;
return R(reinterpret_cast<rpointer>(ptr));
}
// comparison