1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Simplify GDVIRTUAL_REQUIRED_CALL calls

This commit is contained in:
kobewi
2022-11-30 16:40:50 +01:00
parent cd491c6e47
commit 9a3960daa5
8 changed files with 124 additions and 233 deletions

View File

@@ -92,18 +92,13 @@ void Material::inspect_native_shader_code() {
RID Material::get_shader_rid() const {
RID ret;
if (GDVIRTUAL_REQUIRED_CALL(_get_shader_rid, ret)) {
return ret;
}
return RID();
GDVIRTUAL_REQUIRED_CALL(_get_shader_rid, ret);
return ret;
}
Shader::Mode Material::get_shader_mode() const {
Shader::Mode ret;
if (GDVIRTUAL_REQUIRED_CALL(_get_shader_mode, ret)) {
return ret;
}
return Shader::MODE_MAX;
Shader::Mode ret = Shader::MODE_MAX;
GDVIRTUAL_REQUIRED_CALL(_get_shader_mode, ret);
return ret;
}
bool Material::_can_do_next_pass() const {