You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Replace size() == 0 with is_empty().
This commit is contained in:
@@ -282,7 +282,7 @@ void ShaderRD::_compile_variant(uint32_t p_variant, CompileData p_data) {
|
||||
current_source = builder.as_string();
|
||||
RD::ShaderStageSPIRVData stage;
|
||||
stage.spirv = RD::get_singleton()->shader_compile_spirv_from_source(RD::SHADER_STAGE_VERTEX, current_source, RD::SHADER_LANGUAGE_GLSL, &error);
|
||||
if (stage.spirv.size() == 0) {
|
||||
if (stage.spirv.is_empty()) {
|
||||
build_ok = false;
|
||||
} else {
|
||||
stage.shader_stage = RD::SHADER_STAGE_VERTEX;
|
||||
@@ -300,7 +300,7 @@ void ShaderRD::_compile_variant(uint32_t p_variant, CompileData p_data) {
|
||||
current_source = builder.as_string();
|
||||
RD::ShaderStageSPIRVData stage;
|
||||
stage.spirv = RD::get_singleton()->shader_compile_spirv_from_source(RD::SHADER_STAGE_FRAGMENT, current_source, RD::SHADER_LANGUAGE_GLSL, &error);
|
||||
if (stage.spirv.size() == 0) {
|
||||
if (stage.spirv.is_empty()) {
|
||||
build_ok = false;
|
||||
} else {
|
||||
stage.shader_stage = RD::SHADER_STAGE_FRAGMENT;
|
||||
@@ -319,7 +319,7 @@ void ShaderRD::_compile_variant(uint32_t p_variant, CompileData p_data) {
|
||||
|
||||
RD::ShaderStageSPIRVData stage;
|
||||
stage.spirv = RD::get_singleton()->shader_compile_spirv_from_source(RD::SHADER_STAGE_COMPUTE, current_source, RD::SHADER_LANGUAGE_GLSL, &error);
|
||||
if (stage.spirv.size() == 0) {
|
||||
if (stage.spirv.is_empty()) {
|
||||
build_ok = false;
|
||||
} else {
|
||||
stage.shader_stage = RD::SHADER_STAGE_COMPUTE;
|
||||
|
||||
Reference in New Issue
Block a user