mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
Merge "WebPMemToUint32: remove ptr cast to int"
This commit is contained in:
commit
3879074d99
@ -66,7 +66,7 @@ WEBP_EXTERN void WebPSafeFree(void* const ptr);
|
|||||||
// memcpy() is the safe way of moving potentially unaligned 32b memory.
|
// memcpy() is the safe way of moving potentially unaligned 32b memory.
|
||||||
static WEBP_INLINE uint32_t WebPMemToUint32(const uint8_t* const ptr) {
|
static WEBP_INLINE uint32_t WebPMemToUint32(const uint8_t* const ptr) {
|
||||||
uint32_t A;
|
uint32_t A;
|
||||||
memcpy(&A, (const int*)ptr, sizeof(A));
|
memcpy(&A, ptr, sizeof(A));
|
||||||
return A;
|
return A;
|
||||||
}
|
}
|
||||||
static WEBP_INLINE void WebPUint32ToMem(uint8_t* const ptr, uint32_t val) {
|
static WEBP_INLINE void WebPUint32ToMem(uint8_t* const ptr, uint32_t val) {
|
||||||
|
Loading…
Reference in New Issue
Block a user