From 37a4353e95a60bc2c457cc9847b8e3fd42ceb214 Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Fri, 12 Jul 2024 13:54:05 -0700 Subject: [PATCH] Minor code style updates Signed-off-by: Jonathan Stone --- source/MaterialXGraphEditor/Graph.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/MaterialXGraphEditor/Graph.cpp b/source/MaterialXGraphEditor/Graph.cpp index 903e7b6521..22e00fd68b 100644 --- a/source/MaterialXGraphEditor/Graph.cpp +++ b/source/MaterialXGraphEditor/Graph.cpp @@ -3362,13 +3362,13 @@ void Graph::propertyEditor() for (UiNodePtr node : _graphNodes) { std::vector inputs = node->inputPins; - if (node->getInput() == nullptr) + if (!node->getInput()) { for (size_t i = 0; i < inputs.size(); i++) { - std::string inputName = inputs[i]->_name; + const std::string& inputName = inputs[i]->_name; UiNodePtr inputNode = node->getConnectedNode(inputName); - if (inputNode != nullptr && inputNode->getName() == name && node->getNode()) + if (inputNode && inputNode->getName() == name && node->getNode()) { node->getNode()->getInput(inputName)->setAttribute("nodegraph", name); }