wgtmac commented on a change in pull request #958:
URL: https://github.com/apache/orc/pull/958#discussion_r742486944
##########
File path: c++/src/LzoDecompressor.cc
##########
@@ -312,13 +312,11 @@ namespace orc {
output += SIZE_OF_INT;
matchAddress += increment32;
- *reinterpret_cast<int32_t*>(output) =
- *reinterpret_cast<int32_t*>(matchAddress);
+ memcpy(output, matchAddress, SIZE_OF_INT);
Review comment:
The compiler may optimize the memcpy call. BTW, should we wrap a
bit_cast function which uses memcpy before C++20 and uses the native one if
C++20 is available?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]