aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-14 16:55:28 -0700
committerChris Robinson <[email protected]>2019-09-14 18:35:23 -0700
commit2c348cecb68bd3a71d388547d6b3330f9cebbfad (patch)
tree445e6387a7356da79c93db166ca8da057a0a0cfc /common
parent1c45b1791b784fb9b70e8c6ce8a1ea158e9004ff (diff)
Fix some more implicit conversions noted by GCC
Diffstat (limited to 'common')
-rw-r--r--common/almalloc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/almalloc.cpp b/common/almalloc.cpp
index 8700bddc..842fb400 100644
--- a/common/almalloc.cpp
+++ b/common/almalloc.cpp
@@ -30,11 +30,11 @@ void *al_malloc(size_t alignment, size_t size)
#elif defined(HAVE__ALIGNED_MALLOC)
return _aligned_malloc(size, alignment);
#else
- char *ret = static_cast<char*>(malloc(size+alignment));
+ auto *ret = static_cast<char*>(malloc(size+alignment));
if(ret != nullptr)
{
*(ret++) = 0x00;
- while((reinterpret_cast<ptrdiff_t>(ret)&(alignment-1)) != 0)
+ while((reinterpret_cast<uintptr_t>(ret)&(alignment-1)) != 0)
*(ret++) = 0x55;
}
return ret;
@@ -57,7 +57,7 @@ void al_free(void *ptr) noexcept
#else
if(ptr != nullptr)
{
- char *finder = static_cast<char*>(ptr);
+ auto *finder = static_cast<char*>(ptr);
do {
--finder;
} while(*finder == 0x55);