diff options
Diffstat (limited to 'include/llvm/Support/MallocAllocator.h')
-rw-r--r-- | include/llvm/Support/MallocAllocator.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Support/MallocAllocator.h b/include/llvm/Support/MallocAllocator.h index 022953d..3e3da41 100644 --- a/include/llvm/Support/MallocAllocator.h +++ b/include/llvm/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(); |