From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- third_party/jpeg-xl/lib/jxl/cache_aligned.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'third_party/jpeg-xl/lib/jxl/cache_aligned.cc') diff --git a/third_party/jpeg-xl/lib/jxl/cache_aligned.cc b/third_party/jpeg-xl/lib/jxl/cache_aligned.cc index 8a95634d68..814b538cf6 100644 --- a/third_party/jpeg-xl/lib/jxl/cache_aligned.cc +++ b/third_party/jpeg-xl/lib/jxl/cache_aligned.cc @@ -128,11 +128,12 @@ void* CacheAligned::Allocate(const size_t payload_size, size_t offset) { const uintptr_t payload = aligned + offset; // still aligned // Stash `allocated` and payload_size inside header for use by Free(). - AllocationHeader* header = reinterpret_cast(payload) - 1; + AllocationHeader* header = + reinterpret_cast(payload) - 1; // NOLINT header->allocated = allocated; header->allocated_size = allocated_size; - return JXL_ASSUME_ALIGNED(reinterpret_cast(payload), 64); + return JXL_ASSUME_ALIGNED(reinterpret_cast(payload), 64); // NOLINT } void CacheAligned::Free(const void* aligned_pointer) { @@ -142,7 +143,7 @@ void CacheAligned::Free(const void* aligned_pointer) { const uintptr_t payload = reinterpret_cast(aligned_pointer); JXL_ASSERT(payload % kAlignment == 0); const AllocationHeader* header = - reinterpret_cast(payload) - 1; + reinterpret_cast(payload) - 1; // NOLINT // Subtract (2's complement negation). bytes_in_use.fetch_add(~header->allocated_size + 1, -- cgit v1.2.3