summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/fs_memory_management.h
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2024-02-10 18:15:58 +0100
committerFearlessTobi <thm.frey@gmail.com>2024-02-19 19:20:40 +0100
commitd5e4617ab5c8b7e72e2155de886135766ce61c7a (patch)
tree5d76b2101df594324bedb323bb5340e24ed7fa7c /src/core/file_sys/fs_memory_management.h
parentMerge pull request #13080 from FearlessTobi/scope-exit (diff)
downloadyuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.tar
yuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.tar.gz
yuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.tar.bz2
yuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.tar.lz
yuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.tar.xz
yuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.tar.zst
yuzu-d5e4617ab5c8b7e72e2155de886135766ce61c7a.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/fs_memory_management.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/file_sys/fs_memory_management.h b/src/core/file_sys/fs_memory_management.h
index f03c6354b..080017c5d 100644
--- a/src/core/file_sys/fs_memory_management.h
+++ b/src/core/file_sys/fs_memory_management.h
@@ -10,7 +10,7 @@ namespace FileSys {
constexpr size_t RequiredAlignment = alignof(u64);
-void* AllocateUnsafe(size_t size) {
+inline void* AllocateUnsafe(size_t size) {
// Allocate
void* const ptr = ::operator new(size, std::align_val_t{RequiredAlignment});
@@ -21,16 +21,16 @@ void* AllocateUnsafe(size_t size) {
return ptr;
}
-void DeallocateUnsafe(void* ptr, size_t size) {
+inline void DeallocateUnsafe(void* ptr, size_t size) {
// Deallocate the pointer
::operator delete(ptr, std::align_val_t{RequiredAlignment});
}
-void* Allocate(size_t size) {
+inline void* Allocate(size_t size) {
return AllocateUnsafe(size);
}
-void Deallocate(void* ptr, size_t size) {
+inline void Deallocate(void* ptr, size_t size) {
// If the pointer is non-null, deallocate it
if (ptr != nullptr) {
DeallocateUnsafe(ptr, size);