summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Kernel')
-rw-r--r--dev/Kernel/KernelKit/MemoryMgr.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/dev/Kernel/KernelKit/MemoryMgr.h b/dev/Kernel/KernelKit/MemoryMgr.h
index 05288704..1c42d71d 100644
--- a/dev/Kernel/KernelKit/MemoryMgr.h
+++ b/dev/Kernel/KernelKit/MemoryMgr.h
@@ -62,16 +62,17 @@ namespace Kernel
/// @param cls The class to allocate.
/// @param args The args to pass.
template <typename T, typename... Args>
- inline Void mm_new_class(_Input _Output T** cls, _Input Args&&... args)
+ inline BOOL mm_new_class(_Input _Output T** cls, _Input Args&&... args)
{
if (*cls)
{
err_global_get() = Kernel::kErrorInvalidData;
- return;
+ return NO;
}
*cls = new T(move(args)...);
- }
+ return *cls;
+ }
/// @brief Delete and nullify C++ class.
/// @param cls The class to delete.