From cde13a5275ad8a8a11519d522692f3f214151102 Mon Sep 17 00:00:00 2001 From: Daguerreo Date: Mon, 21 Dec 2020 01:36:17 +0100 Subject: [PATCH] #6 Fix broken converters --- include/nodes/internal/Connection.hpp | 2 +- src/Connection.cpp | 4 +--- src/Node.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/nodes/internal/Connection.hpp b/include/nodes/internal/Connection.hpp index efee84cf..5b96fe9a 100644 --- a/include/nodes/internal/Connection.hpp +++ b/include/nodes/internal/Connection.hpp @@ -115,7 +115,7 @@ class NODE_EDITOR_PUBLIC Connection NodeDataType dataType(PortType portType) const; - TypeConverter getTypeConverter() const; + TypeConverter& typeConverter(); void setTypeConverter(TypeConverter converter); diff --git a/src/Connection.cpp b/src/Connection.cpp index 62695a7d..79ecb237 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -420,9 +420,7 @@ dataType(PortType portType) const Q_UNREACHABLE(); } -TypeConverter -Connection:: -getTypeConverter() const +QtNodes::TypeConverter& Connection::typeConverter() { return _converter; } diff --git a/src/Node.cpp b/src/Node.cpp index d62fa9f9..b7872e68 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -198,7 +198,7 @@ propagateData(PortIndex inPortIndex) const Node* outNode = c->getNode(PortType::Out); PortIndex outNodeIndex = c->getPortIndex(PortType::Out); std::shared_ptr outData = outNode->nodeDataModel()->outData(outNodeIndex); - TypeConverter converter = c->getTypeConverter(); + auto& converter = c->typeConverter(); if (converter != nullptr) { outData = converter(outData);