8295014: Remove unnecessary explicit casts to void* in CHeapObjBase
Reviewed-by: jsjolen, dholmes, stefank
This commit is contained in:
parent
1bfcc2790a
commit
e6c33e62b5
@ -177,49 +177,49 @@ void FreeHeap(void* p);
|
|||||||
class CHeapObjBase {
|
class CHeapObjBase {
|
||||||
public:
|
public:
|
||||||
ALWAYSINLINE void* operator new(size_t size, MEMFLAGS f) throw() {
|
ALWAYSINLINE void* operator new(size_t size, MEMFLAGS f) throw() {
|
||||||
return (void*)AllocateHeap(size, f);
|
return AllocateHeap(size, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new(size_t size,
|
ALWAYSINLINE void* operator new(size_t size,
|
||||||
MEMFLAGS f,
|
MEMFLAGS f,
|
||||||
const NativeCallStack& stack) throw() {
|
const NativeCallStack& stack) throw() {
|
||||||
return (void*)AllocateHeap(size, f, stack);
|
return AllocateHeap(size, f, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new(size_t size,
|
ALWAYSINLINE void* operator new(size_t size,
|
||||||
MEMFLAGS f,
|
MEMFLAGS f,
|
||||||
const std::nothrow_t&,
|
const std::nothrow_t&,
|
||||||
const NativeCallStack& stack) throw() {
|
const NativeCallStack& stack) throw() {
|
||||||
return (void*)AllocateHeap(size, f, stack, AllocFailStrategy::RETURN_NULL);
|
return AllocateHeap(size, f, stack, AllocFailStrategy::RETURN_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new(size_t size,
|
ALWAYSINLINE void* operator new(size_t size,
|
||||||
MEMFLAGS f,
|
MEMFLAGS f,
|
||||||
const std::nothrow_t&) throw() {
|
const std::nothrow_t&) throw() {
|
||||||
return (void*)AllocateHeap(size, f, AllocFailStrategy::RETURN_NULL);
|
return AllocateHeap(size, f, AllocFailStrategy::RETURN_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new[](size_t size, MEMFLAGS f) throw() {
|
ALWAYSINLINE void* operator new[](size_t size, MEMFLAGS f) throw() {
|
||||||
return (void*)AllocateHeap(size, f);
|
return AllocateHeap(size, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new[](size_t size,
|
ALWAYSINLINE void* operator new[](size_t size,
|
||||||
MEMFLAGS f,
|
MEMFLAGS f,
|
||||||
const NativeCallStack& stack) throw() {
|
const NativeCallStack& stack) throw() {
|
||||||
return (void*)AllocateHeap(size, f, stack);
|
return AllocateHeap(size, f, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new[](size_t size,
|
ALWAYSINLINE void* operator new[](size_t size,
|
||||||
MEMFLAGS f,
|
MEMFLAGS f,
|
||||||
const std::nothrow_t&,
|
const std::nothrow_t&,
|
||||||
const NativeCallStack& stack) throw() {
|
const NativeCallStack& stack) throw() {
|
||||||
return (void*)AllocateHeap(size, f, stack, AllocFailStrategy::RETURN_NULL);
|
return AllocateHeap(size, f, stack, AllocFailStrategy::RETURN_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYSINLINE void* operator new[](size_t size,
|
ALWAYSINLINE void* operator new[](size_t size,
|
||||||
MEMFLAGS f,
|
MEMFLAGS f,
|
||||||
const std::nothrow_t&) throw() {
|
const std::nothrow_t&) throw() {
|
||||||
return (void*)AllocateHeap(size, f, AllocFailStrategy::RETURN_NULL);
|
return AllocateHeap(size, f, AllocFailStrategy::RETURN_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete(void* p) { FreeHeap(p); }
|
void operator delete(void* p) { FreeHeap(p); }
|
||||||
|
Loading…
Reference in New Issue
Block a user