unified_memory_manager: mark comparison operators as const

This fixes the build on some compilers.

Signed-off-by: rcombs <rcombs@rcombs.me>
This commit is contained in:
rcombs
2023-04-18 20:01:15 -05:00
committed by Compute-Runtime-Automation
parent 853a65aae9
commit fc53bbe183

View File

@@ -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;
}
};