diff options
Diffstat (limited to 'llvm/include/Support/MallocAllocator.h')
| -rw-r--r-- | llvm/include/Support/MallocAllocator.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/Support/MallocAllocator.h b/llvm/include/Support/MallocAllocator.h index 022953df93d..3e3da4139c1 100644 --- a/llvm/include/Support/MallocAllocator.h +++ b/llvm/include/Support/MallocAllocator.h @@ -47,15 +47,15 @@ struct MallocAllocator { size_type max_size() const { return ~0 / sizeof(T); } static pointer allocate(size_t n, void* hint = 0) { - return (pointer)malloc(n*sizeof(T)); + return static_cast<pointer>(malloc(n*sizeof(T))); } static void deallocate(pointer p, size_t n) { - free((void*)p); + free(static_cast<void*>(p)); } void construct(pointer p, const T &val) { - new((void*)p) T(val); + new(static_cast<void*>(p)) T(val); } void destroy(pointer p) { p->~T(); |

