svl : use uintptr_t instead of sal_uInt32 or sal_uInt64

Change-Id: I57a860ee67cc986936b1488f4ab59b5c47f2fd15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140657
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
Arnaud Versini
2022-10-03 17:49:26 +02:00
committed by Eike Rathke
parent 07aa8138db
commit 4ab8efd367
+2 -10
View File
@@ -49,20 +49,12 @@ static bool isDeletedPtr(SvtListener* p)
/** mark deleted entries by toggling the last bit,which is effectively unused, since the struct we point
* to is at least 16-bit aligned. This allows the binary search to continue working even when we have
* deleted entries */
#if SAL_TYPES_SIZEOFPOINTER == 4
return (reinterpret_cast<sal_uInt32>(p) & 0x01) == 0x01;
#else
return (reinterpret_cast<sal_uInt64>(p) & 0x01) == 0x01;
#endif
return (reinterpret_cast<uintptr_t>(p) & 0x01) == 0x01;
}
static void markDeletedPtr(SvtListener*& rp)
{
#if SAL_TYPES_SIZEOFPOINTER == 4
reinterpret_cast<sal_uInt32&>(rp) |= 0x01;
#else
reinterpret_cast<sal_uInt64&>(rp) |= 0x01;
#endif
reinterpret_cast<uintptr_t&>(rp) |= 0x01;
}
static void sortListeners(std::vector<SvtListener*>& listeners, size_t firstUnsorted)