Desktop: Fix Node Graph Overlay (#3042)

Replace usize::MAX with u32::MAX as a marker value which can be used on both native and wasm
This commit is contained in:
Dennis Kobert 2025-08-11 15:23:12 +02:00 committed by GitHub
parent fa2167dd7f
commit 437fc70500
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -2416,7 +2416,7 @@ impl NodeGraphMessageHandler {
} else {
added_wires.push(WirePathUpdate {
id: NodeId(u64::MAX),
input_index: usize::MAX,
input_index: u32::MAX as usize,
wire_path_update: None,
})
}

View File

@ -2635,7 +2635,7 @@ impl NodeNetworkInterface {
InputConnector::Node { node_id, input_index } => (*node_id, *input_index),
InputConnector::Export(export_index) => (NodeId(u64::MAX), *export_index),
})
.chain(std::iter::once((NodeId(u64::MAX), usize::MAX)))
.chain(std::iter::once((NodeId(u64::MAX), u32::MAX as usize)))
.collect()
}
@ -2725,7 +2725,7 @@ impl NodeNetworkInterface {
Some(WirePathUpdate {
id: NodeId(u64::MAX),
input_index: usize::MAX,
input_index: u32::MAX as usize,
wire_path_update,
})
}
@ -6047,7 +6047,7 @@ impl Iterator for FlowIter<'_> {
} else {
0
};
let take = if self.flow_type == FlowType::UpstreamFlow { usize::MAX } else { 1 };
let take = if self.flow_type == FlowType::UpstreamFlow { u32::MAX as usize } else { 1 };
let inputs = document_node.inputs.iter().skip(skip).take(take);
let node_ids = inputs.filter_map(|input| match input {