Skip to content

Commit 4c920f0

Browse files
zmothpaceholder
authored andcommitted
Change some unsigned int variables to NodeId.
Fix the `getNodeId()` function return value to `NodeId`
1 parent 6309992 commit 4c920f0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/dynamic_ports/DynamicPortsModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,5 @@ class DynamicPortsModel : public QtNodes::AbstractGraphModel
122122
mutable std::unordered_map<NodeId, PortAddRemoveWidget *> _nodeWidgets;
123123

124124
/// A convenience variable needed for generating unique node ids.
125-
unsigned int _nextNodeId;
125+
NodeId _nextNodeId;
126126
};

examples/simple_graph_model/SimpleGraphModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@ class SimpleGraphModel : public QtNodes::AbstractGraphModel
105105
mutable std::unordered_map<NodeId, NodeGeometryData> _nodeGeometryData;
106106

107107
/// A convenience variable needed for generating unique node ids.
108-
unsigned int _nextNodeId;
108+
NodeId _nextNodeId;
109109
};

examples/vertical_layout/SimpleGraphModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ class SimpleGraphModel : public QtNodes::AbstractGraphModel
106106
mutable std::unordered_map<NodeId, NodeGeometryData> _nodeGeometryData;
107107

108108
/// A convenience variable needed for generating unique node ids.
109-
unsigned int _nextNodeId;
109+
NodeId _nextNodeId;
110110
};

src/BasicGraphicsScene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void BasicGraphicsScene::traverseGraphAndPopulateGraphicsObjects()
193193

194194
// Then for each node check output connections and insert them.
195195
for (NodeId const nodeId : allNodeIds) {
196-
unsigned int nOutPorts = _graphModel.nodeData<PortCount>(nodeId, NodeRole::OutPortCount);
196+
auto nOutPorts = _graphModel.nodeData<PortCount>(nodeId, NodeRole::OutPortCount);
197197

198198
for (PortIndex index = 0; index < nOutPorts; ++index) {
199199
auto const &outConnectionIds = _graphModel.connections(nodeId, PortType::Out, index);

0 commit comments

Comments
 (0)