From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/debug/debug_new.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/debug') diff --git a/src/debug/debug_new.cpp b/src/debug/debug_new.cpp index f8c9dc73c..1a8f79a64 100644 --- a/src/debug/debug_new.cpp +++ b/src/debug/debug_new.cpp @@ -516,7 +516,7 @@ static void* alloc_mem(size_t size, const char* file, int line, bool is_array) fprintf(new_output_fp, "new%s: allocated %p (size %u, ", is_array ? "[]" : "", - pointer, static_cast(size)); + pointer, CAST_U32(size)); if (line != 0) print_position(ptr->file, ptr->line); else @@ -566,7 +566,7 @@ static void free_pointer(void* pointer, void* addr, bool is_array) "%s: pointer %p (size %u)\n\tat ", msg, reinterpret_cast(ptr) + ALIGNED_LIST_ITEM_SIZE, - static_cast(ptr->size)); + CAST_U32(ptr->size)); print_position(addr, 0); fprintf(new_output_fp, "\n\toriginally allocated at "); if (ptr->line != 0) @@ -599,8 +599,8 @@ static void free_pointer(void* pointer, void* addr, bool is_array) "delete%s: freed %p (size %u, %u bytes still allocated)\n", is_array ? "[]" : "", reinterpret_cast(ptr) + ALIGNED_LIST_ITEM_SIZE, - static_cast(ptr->size), - static_cast(total_mem_alloc)); + CAST_U32(ptr->size), + CAST_U32(total_mem_alloc)); } free(ptr); return; @@ -646,7 +646,7 @@ int check_leaks() { fprintf(new_output_fp, "Leaked object at %p (size %u, dump %u, ", - pointer, static_cast(ptr->size), ptr->dumped); + pointer, CAST_U32(ptr->size), ptr->dumped); if (ptr->line != 0) print_position(ptr->file, ptr->line); else @@ -704,7 +704,7 @@ int check_mem_corruption() fprintf(new_output_fp, "Heap data corrupt near %p (size %u, ", pointer, - static_cast(ptr->size)); + CAST_U32(ptr->size)); #if M_DEBUG_NEW_TAILCHECK } else -- cgit v1.2.3-60-g2f50