From 5272c9dde4e1b5b178e56a469a8f4e38c7d3bd5f Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Fri, 9 Sep 2016 15:51:42 +0100 Subject: [PATCH] Restore safe reinterpret_casts in XWindowsUtil --- src/lib/platform/XWindowsUtil.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/platform/XWindowsUtil.cpp b/src/lib/platform/XWindowsUtil.cpp index 304bca13..10b35096 100644 --- a/src/lib/platform/XWindowsUtil.cpp +++ b/src/lib/platform/XWindowsUtil.cpp @@ -1665,35 +1665,35 @@ XWindowsUtil::convertAtomProperty(String& data) // 64-bit numbers we have to ensure the last number is a full 64 bits. if (sizeof(Atom) != 4 && ((data.size() / 4) & 1) != 0) { UInt32 zero = 0; - data.append(static_cast(&zero), sizeof(zero)); + data.append(reinterpret_cast(&zero), sizeof(zero)); } } void XWindowsUtil::appendAtomData(String& data, Atom atom) { - data.append(static_cast(&atom), sizeof(Atom)); + data.append(reinterpret_cast(&atom), sizeof(Atom)); } void XWindowsUtil::replaceAtomData(String& data, UInt32 index, Atom atom) { data.replace(index * sizeof(Atom), sizeof(Atom), - static_cast(&atom), + reinterpret_cast(&atom), sizeof(Atom)); } void XWindowsUtil::appendTimeData(String& data, Time time) { - data.append(static_cast(&time), sizeof(Time)); + data.append(reinterpret_cast(&time), sizeof(Time)); } Bool XWindowsUtil::propertyNotifyPredicate(Display*, XEvent* xevent, XPointer arg) { PropertyNotifyPredicateInfo* filter = - static_cast(arg); + reinterpret_cast(arg); return (xevent->type == PropertyNotify && xevent->xproperty.window == filter->m_window && xevent->xproperty.atom == filter->m_property &&