[+] MemoryView::DemoteFromSharedView
This commit is contained in:
parent
30b89f1bd7
commit
60771f6e6b
@ -435,6 +435,24 @@ namespace Aurora::Memory
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void DemoteFromSharedView(const AuSPtr<MemoryView> &pCopy)
|
||||
{
|
||||
if (!pCopy)
|
||||
{
|
||||
AuResetMember(*this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pCopy->HasControlBlock())
|
||||
{
|
||||
AuResetMember(*this, AuConstReference(*pCopy.get()));
|
||||
}
|
||||
else
|
||||
{
|
||||
AuResetMember(*this, AuConstReference(*pCopy.get()), pCopy);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
using MemoryViewRead = MemoryView<true>;
|
||||
|
Loading…
Reference in New Issue
Block a user