From fc53bbe1837959968f07539551d4a7110930885f Mon Sep 17 00:00:00 2001 From: rcombs Date: Tue, 18 Apr 2023 20:01:15 -0500 Subject: [PATCH] unified_memory_manager: mark comparison operators as const This fixes the build on some compilers. Signed-off-by: rcombs --- shared/source/memory_manager/unified_memory_manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/source/memory_manager/unified_memory_manager.h b/shared/source/memory_manager/unified_memory_manager.h index e9187f48be..f802eb5d30 100644 --- a/shared/source/memory_manager/unified_memory_manager.h +++ b/shared/source/memory_manager/unified_memory_manager.h @@ -130,10 +130,10 @@ class SVMAllocsManager { size_t allocationSize; void *allocation; SvmCacheAllocationInfo(size_t allocationSize, void *allocation) : allocationSize(allocationSize), allocation(allocation) {} - bool operator<(SvmCacheAllocationInfo const &other) { + bool operator<(SvmCacheAllocationInfo const &other) const { return allocationSize < other.allocationSize; } - bool operator<(size_t const &size) { + bool operator<(size_t const &size) const { return allocationSize < size; } };