libstrat: fix override operator new to be noexcept (closes #1494)

This commit is contained in:
Michael Scire 2021-05-16 23:10:13 -07:00
parent 25be7c5b1b
commit c790d03693
3 changed files with 13 additions and 15 deletions

View file

@ -20,23 +20,23 @@ namespace ams::fs::impl {
class Newable {
public:
static void *operator new(size_t size) {
static ALWAYS_INLINE void *operator new(size_t size) noexcept {
return ::ams::fs::impl::Allocate(size);
}
static void *operator new(size_t size, Newable *placement) {
static ALWAYS_INLINE void *operator new(size_t size, Newable *placement) noexcept {
return placement;
}
static void *operator new[](size_t size) {
static ALWAYS_INLINE void *operator new[](size_t size) noexcept {
return ::ams::fs::impl::Allocate(size);
}
static void operator delete(void *ptr, size_t size) {
static ALWAYS_INLINE void operator delete(void *ptr, size_t size) noexcept {
return ::ams::fs::impl::Deallocate(ptr, size);
}
static void operator delete[](void *ptr, size_t size) {
static ALWAYS_INLINE void operator delete[](void *ptr, size_t size) noexcept {
return ::ams::fs::impl::Deallocate(ptr, size);
}
};