nodes: moved hashing to nodes so they can override behavior if they wish

This commit is contained in:
itsmattkc
2020-04-30 01:56:08 +10:00
parent ba94aa0b22
commit aecfa842c3
13 changed files with 128 additions and 115 deletions
+8
View File
@@ -62,4 +62,12 @@ NodeValueTable TimeInput::Value(NodeValueDatabase &value) const
return table;
}
void TimeInput::Hash(QCryptographicHash &hash, const rational &time) const
{
Node::Hash(hash, time);
// Make sure time is hashed
hash.addData(NodeParam::ValueToBytes(NodeParam::kRational, QVariant::fromValue(time)));
}
OLIVE_NAMESPACE_EXIT