This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Restore safe reinterpret_casts in XWindowsClipboardBMPConverter

  • Loading branch information...
nlyan committed Sep 9, 2016
1 parent 5b8fb69 commit 16977788d3406cbbef7823f07a81b2cc15d18f96
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/lib/platform/XWindowsClipboardBMPConverter.cpp
@@ -113,7 +113,7 @@ XWindowsClipboardBMPConverter::fromIClipboard(const String& bmp) const
toLE(dst, static_cast<UInt16>(0));
toLE(dst, static_cast<UInt16>(0));
toLE(dst, static_cast<UInt32>(14 + 40));
- return String(static_cast<const char*>(header), 14) + bmp;
+ return String(reinterpret_cast<const char*>(header), 14) + bmp;
}
String
@@ -125,7 +125,7 @@ XWindowsClipboardBMPConverter::toIClipboard(const String& bmp) const
}
// check BMP file header
- const UInt8* rawBMPHeader = static_cast<const UInt8*>(bmp.data());
+ const UInt8* rawBMPHeader = reinterpret_cast<const UInt8*>(bmp.data());
if (rawBMPHeader[0] != 'B' || rawBMPHeader[1] != 'M') {
return String();
}

0 comments on commit 1697778

Please sign in to comment.