mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Removed hack for clang compiler error. It didn't work anyway.
This commit is contained in:
parent
655b87fd87
commit
abf747a79f
@ -3061,13 +3061,9 @@ static void VmaWriteMagicValue(void* pData, VkDeviceSize offset)
|
|||||||
{
|
{
|
||||||
uint32_t* pDst = (uint32_t*)((char*)pData + offset);
|
uint32_t* pDst = (uint32_t*)((char*)pData + offset);
|
||||||
const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t);
|
const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t);
|
||||||
// This condition is to silence clang compiler error: "comparison of unsigned expression < 0 is always false"
|
for(size_t i = 0; i < numberCount; ++i, ++pDst)
|
||||||
if(numberCount > 0)
|
|
||||||
{
|
{
|
||||||
for(size_t i = 0; i < numberCount; ++i, ++pDst)
|
*pDst = VMA_CORRUPTION_DETECTION_MAGIC_VALUE;
|
||||||
{
|
|
||||||
*pDst = VMA_CORRUPTION_DETECTION_MAGIC_VALUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3075,15 +3071,11 @@ static bool VmaValidateMagicValue(const void* pData, VkDeviceSize offset)
|
|||||||
{
|
{
|
||||||
const uint32_t* pSrc = (const uint32_t*)((const char*)pData + offset);
|
const uint32_t* pSrc = (const uint32_t*)((const char*)pData + offset);
|
||||||
const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t);
|
const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t);
|
||||||
// This condition is to silence clang compiler error: "comparison of unsigned expression < 0 is always false"
|
for(size_t i = 0; i < numberCount; ++i, ++pSrc)
|
||||||
if(numberCount > 0)
|
|
||||||
{
|
{
|
||||||
for(size_t i = 0; i < numberCount; ++i, ++pSrc)
|
if(*pSrc != VMA_CORRUPTION_DETECTION_MAGIC_VALUE)
|
||||||
{
|
{
|
||||||
if(*pSrc != VMA_CORRUPTION_DETECTION_MAGIC_VALUE)
|
return false;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user