You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Merge pull request #71479 from raulsntos/virtual-return-type
Use enum instead of int in virtual methods return type
This commit is contained in:
@@ -427,7 +427,10 @@ void VisualShaderNodeCustom::update_ports() {
|
||||
if (!GDVIRTUAL_CALL(_get_input_port_name, i, port.name)) {
|
||||
port.name = "in" + itos(i);
|
||||
}
|
||||
if (!GDVIRTUAL_CALL(_get_input_port_type, i, port.type)) {
|
||||
PortType port_type;
|
||||
if (GDVIRTUAL_CALL(_get_input_port_type, i, port_type)) {
|
||||
port.type = (int)port_type;
|
||||
} else {
|
||||
port.type = (int)PortType::PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
@@ -445,7 +448,10 @@ void VisualShaderNodeCustom::update_ports() {
|
||||
if (!GDVIRTUAL_CALL(_get_output_port_name, i, port.name)) {
|
||||
port.name = "out" + itos(i);
|
||||
}
|
||||
if (!GDVIRTUAL_CALL(_get_output_port_type, i, port.type)) {
|
||||
PortType port_type;
|
||||
if (GDVIRTUAL_CALL(_get_output_port_type, i, port_type)) {
|
||||
port.type = (int)port_type;
|
||||
} else {
|
||||
port.type = (int)PortType::PORT_TYPE_SCALAR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user