[+] AuResetMember (dumb name)
This commit is contained in:
parent
85c85d1a1b
commit
af438c8c17
@ -8,4 +8,4 @@
|
||||
#pragma once
|
||||
|
||||
#include "ClassHelpers.hpp"
|
||||
#include "ModuleApi.hpp"
|
||||
#include "ModuleApi.hpp"
|
28
Include/auROXTL/Objects/ResetMember.hpp
Normal file
28
Include/auROXTL/Objects/ResetMember.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
/***
|
||||
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||||
|
||||
File: ResetMember.hpp
|
||||
Date: 2022-08-26
|
||||
Author: Reece
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
template <class T>
|
||||
static void AuResetMember(T &ref)
|
||||
{
|
||||
ref = AuDecay_t<T>();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void AuResetMember(AuSPtr<T> &ref)
|
||||
{
|
||||
ref.reset();
|
||||
}
|
||||
|
||||
namespace Aurora::Memory
|
||||
{
|
||||
struct ByteBuffer;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void AuResetMember(Aurora::Memory::ByteBuffer &ref);
|
@ -50,6 +50,7 @@
|
||||
#include <auROXTL/auTryConstructUtils.hpp>
|
||||
|
||||
#include <auROXTL/Objects/SafeDestroy.hpp>
|
||||
#include <auROXTL/Objects/ResetMember.hpp>
|
||||
|
||||
struct IAuNullDelegate
|
||||
{
|
||||
@ -64,7 +65,7 @@ struct AuNullCallback
|
||||
AU_DEFINE_CTOR_ONE(AuNullCallback, (AuVoidFunc, voidFunc));
|
||||
AU_DEFINE_CTOR_ONE(AuNullCallback, (AuSPtr<IAuNullDelegate>, callbackFunc));
|
||||
|
||||
auline void operator()()
|
||||
inline void operator()()
|
||||
{
|
||||
if (voidFunc)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user