From 2bce10f740c69c7bf843144d3328dc9537d0c2bb Mon Sep 17 00:00:00 2001 From: Zephyron Date: Sun, 2 Feb 2025 12:06:07 +1000 Subject: [PATCH] vulkan: Fix parameter naming consistency for Android compilation Renames 'size' parameter to 'length' in IsValidMapping() methods to avoid conflicts with Android NDK macros that define 'size'. This fixes compilation issues on Android platforms where the 'size' macro is defined. --- src/common/host_memory.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index 4ae22fcfb7..ea1cdc6128 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -200,8 +200,8 @@ public: UNREACHABLE(); } - bool IsValidMapping(size_t offset, size_t size) const { - return (offset + size) <= backing_size; + bool IsValidMapping(size_t offset, size_t length) const { + return (offset + length) <= backing_size; } bool IsDirectMappingEnabled() const { @@ -611,8 +611,8 @@ public: virtual_base = nullptr; } - bool IsValidMapping(size_t offset, size_t size) const { - return (offset + size) <= backing_size; + bool IsValidMapping(size_t offset, size_t length) const { + return (offset + length) <= backing_size; } bool IsDirectMappingEnabled() const { @@ -692,7 +692,7 @@ public: void EnableDirectMappedAddress() {} - bool IsValidMapping(size_t offset, size_t size) const { + bool IsValidMapping(size_t offset, size_t length) const { return false; }