aboutsummaryrefslogtreecommitdiff
path: root/src/Core/Memory.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-20 02:27:02 +0200
committerhachem <im@hachem.wtf>2026-08-20 02:40:07 +0200
commit5b361d81dbd2af0d0e99b9eb1adebea76ff05db0 (patch)
tree34db1df17e8c7248aeeb92156d635d31c2484e3f /src/Core/Memory.h
parente3abaaf59777258ba06705135a0cafcb5918ad12 (diff)
[chore]: MASSIVE refactor + more vulkan bs
Diffstat (limited to 'src/Core/Memory.h')
-rw-r--r--src/Core/Memory.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Core/Memory.h b/src/Core/Memory.h
index 0abc6b1..3240c71 100644
--- a/src/Core/Memory.h
+++ b/src/Core/Memory.h
@@ -2,23 +2,23 @@
#include <memory>
-namespace Donut
+namespace Donut
{
template<typename T>
using Ref = std::shared_ptr<T>;
- template<typename T>
+ template<typename T>
using Scope = std::unique_ptr<T>;
-
- template<typename T, typename ... Args>
- constexpr Scope<T> CreateScope(Args&& ... args)
+
+ template<typename T, typename ... Args>
+ constexpr auto create_scope(Args&& ... args) -> Scope<T>
{
return std::make_unique<T>(std::forward<Args>(args)...);
}
-
+
template<typename T, typename ... Args>
- constexpr Ref<T> CreateRef(Args&& ... args)
+ constexpr auto create_ref(Args&& ... args) -> Ref<T>
{
return std::make_shared<T>(std::forward<Args>(args)...);
}
-}; \ No newline at end of file
+};