mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user