1
0
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:
Rémi Verschelde
2023-02-01 07:45:28 +01:00
41 changed files with 114 additions and 110 deletions

View File

@@ -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;
}