mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-30 19:31:07 +00:00
Force evaluation of any lazy structured data on fatal error
This commit is contained in:
@@ -1043,6 +1043,13 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void Detach()
|
||||
{
|
||||
PopulateAllChildren();
|
||||
for(size_t i = 0; i < data.children.size(); i++)
|
||||
data.children[i]->Detach();
|
||||
}
|
||||
|
||||
void PopulateAllChildren() const
|
||||
{
|
||||
if(m_Lazy)
|
||||
@@ -1087,6 +1094,9 @@ private:
|
||||
template <class SerialiserType>
|
||||
friend void DoSerialise(SerialiserType &ser, SDObject &el, StructuredObjectList &children);
|
||||
|
||||
// SDFile should be a friend so it can detach
|
||||
friend struct SDFile;
|
||||
|
||||
void DeleteLazyGenerator() const
|
||||
{
|
||||
if(m_Lazy)
|
||||
@@ -1653,6 +1663,15 @@ public:
|
||||
std::swap(version, other.version);
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Prepares the SDFile to remove any possible dependencies on what
|
||||
created it.
|
||||
)");
|
||||
void Detach()
|
||||
{
|
||||
for(SDChunk *c : chunks)
|
||||
c->Detach();
|
||||
}
|
||||
|
||||
protected:
|
||||
SDFile(const SDFile &) = delete;
|
||||
SDFile &operator=(const SDFile &) = delete;
|
||||
|
||||
Reference in New Issue
Block a user