summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/cache_aligned.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /third_party/jpeg-xl/lib/jxl/cache_aligned.cc
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--third_party/jpeg-xl/lib/jxl/cache_aligned.cc7
1 files changed, 4 insertions, 3 deletions
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<AllocationHeader*>(payload) - 1;
+ AllocationHeader* header =
+ reinterpret_cast<AllocationHeader*>(payload) - 1; // NOLINT
header->allocated = allocated;
header->allocated_size = allocated_size;
- return JXL_ASSUME_ALIGNED(reinterpret_cast<void*>(payload), 64);
+ return JXL_ASSUME_ALIGNED(reinterpret_cast<void*>(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<uintptr_t>(aligned_pointer);
JXL_ASSERT(payload % kAlignment == 0);
const AllocationHeader* header =
- reinterpret_cast<const AllocationHeader*>(payload) - 1;
+ reinterpret_cast<const AllocationHeader*>(payload) - 1; // NOLINT
// Subtract (2's complement negation).
bytes_in_use.fetch_add(~header->allocated_size + 1,