diff --git a/packages/nodegraph/include/nodegraph/core/NodeGraphBase.h b/packages/nodegraph/include/nodegraph/core/NodeGraphBase.h index da7a2cf..71c9583 100644 --- a/packages/nodegraph/include/nodegraph/core/NodeGraphBase.h +++ b/packages/nodegraph/include/nodegraph/core/NodeGraphBase.h @@ -111,7 +111,7 @@ namespace l::nodegraph { template bool IsOfOperation() { - return l::meta::template class_hash == mOperationTypeId; + return l::meta::template class_hash == mOperationTypeHash; } protected: @@ -183,9 +183,10 @@ namespace l::nodegraph { public: NodeGraph(NodeType outputType = NodeType::Default, Params&&... params) : NodeGraphBase(outputType), - mOperation(this, std::forward(params)...), - mOperationTypeId = typeid(T) + mOperation(this, std::forward(params)...) { + mOperationTypeHash = l::meta::class_hash(); + SetNumInputs(mOperation.GetNumInputs()); SetNumOutputs(mOperation.GetNumOutputs());