fix: Data processor recursion detector triggering too soon
This commit is contained in:
parent
b4ee02b725
commit
c9cd7ad4a6
@ -109,6 +109,10 @@ namespace hex::dp {
|
|||||||
throwNodeError("Recursion detected!");
|
throwNodeError("Recursion detected!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unmarkInputProcessed(u32 index) {
|
||||||
|
this->m_processedInputs.erase(index);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
[[noreturn]] void throwNodeError(const std::string &message) {
|
[[noreturn]] void throwNodeError(const std::string &message) {
|
||||||
throw NodeError { this, message };
|
throw NodeError { this, message };
|
||||||
|
@ -29,6 +29,7 @@ namespace hex::dp {
|
|||||||
|
|
||||||
markInputProcessed(index);
|
markInputProcessed(index);
|
||||||
attribute->getParentNode()->process();
|
attribute->getParentNode()->process();
|
||||||
|
unmarkInputProcessed(index);
|
||||||
|
|
||||||
auto &outputData = attribute->getOutputData();
|
auto &outputData = attribute->getOutputData();
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ namespace hex::dp {
|
|||||||
|
|
||||||
markInputProcessed(index);
|
markInputProcessed(index);
|
||||||
attribute->getParentNode()->process();
|
attribute->getParentNode()->process();
|
||||||
|
unmarkInputProcessed(index);
|
||||||
|
|
||||||
return attribute->getOutputData();
|
return attribute->getOutputData();
|
||||||
} else {
|
} else {
|
||||||
@ -74,6 +76,7 @@ namespace hex::dp {
|
|||||||
|
|
||||||
markInputProcessed(index);
|
markInputProcessed(index);
|
||||||
attribute->getParentNode()->process();
|
attribute->getParentNode()->process();
|
||||||
|
unmarkInputProcessed(index);
|
||||||
|
|
||||||
return attribute->getOutputData();
|
return attribute->getOutputData();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user