summaryrefslogtreecommitdiffstats
path: root/sal/rtl/alloc_global.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/rtl/alloc_global.cxx')
-rw-r--r--sal/rtl/alloc_global.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/rtl/alloc_global.cxx b/sal/rtl/alloc_global.cxx
index cff293c97083..69313708e3e5 100644
--- a/sal/rtl/alloc_global.cxx
+++ b/sal/rtl/alloc_global.cxx
@@ -110,9 +110,9 @@ SAL_CALL rtl_allocateMemory_CUSTOM (sal_Size n) SAL_THROW_EXTERN_C()
try_alloc:
if (size <= RTL_MEMORY_CACHED_LIMIT)
- addr = (char*)rtl_cache_alloc(g_alloc_table[(size - 1) >> RTL_MEMALIGN_SHIFT]);
+ addr = static_cast<char*>(rtl_cache_alloc(g_alloc_table[(size - 1) >> RTL_MEMALIGN_SHIFT]));
else
- addr = (char*)rtl_arena_alloc (gp_alloc_arena, &size);
+ addr = static_cast<char*>(rtl_arena_alloc (gp_alloc_arena, &size));
if (addr != 0)
{
@@ -138,7 +138,7 @@ void SAL_CALL rtl_freeMemory_CUSTOM (void * p) SAL_THROW_EXTERN_C()
{
if (p != 0)
{
- char * addr = (char*)(p) - RTL_MEMALIGN;
+ char * addr = static_cast<char*>(p) - RTL_MEMALIGN;
sal_Size size = reinterpret_cast<sal_Size*>(addr)[0];
if (size <= RTL_MEMORY_CACHED_LIMIT)
@@ -157,7 +157,7 @@ void * SAL_CALL rtl_reallocateMemory_CUSTOM (void * p, sal_Size n) SAL_THROW_EXT
if (p != 0)
{
void * p_old = p;
- sal_Size n_old = reinterpret_cast<sal_Size*>( (char*)(p) - RTL_MEMALIGN )[0] - RTL_MEMALIGN;
+ sal_Size n_old = reinterpret_cast<sal_Size*>( static_cast<char*>(p) - RTL_MEMALIGN )[0] - RTL_MEMALIGN;
p = rtl_allocateMemory (n);
if (p != 0)