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