mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Replace String comparisons with "", String() to is_empty()
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
This commit is contained in:
parent
31ded7e126
commit
49403cbfa0
226 changed files with 1051 additions and 1034 deletions
|
|
@ -205,7 +205,7 @@ Vector<uint8_t> RenderingDevice::_shader_compile_binary_from_spirv(const Ref<RDS
|
|||
ShaderStageSPIRVData sd;
|
||||
sd.shader_stage = stage;
|
||||
String error = p_spirv->get_stage_compile_error(stage);
|
||||
ERR_FAIL_COND_V_MSG(error != String(), Vector<uint8_t>(), "Can't create a shader from an errored bytecode. Check errors in source bytecode.");
|
||||
ERR_FAIL_COND_V_MSG(!error.is_empty(), Vector<uint8_t>(), "Can't create a shader from an errored bytecode. Check errors in source bytecode.");
|
||||
sd.spir_v = p_spirv->get_stage_bytecode(stage);
|
||||
if (sd.spir_v.is_empty()) {
|
||||
continue;
|
||||
|
|
@ -225,7 +225,7 @@ RID RenderingDevice::_shader_create_from_spirv(const Ref<RDShaderSPIRV> &p_spirv
|
|||
ShaderStageSPIRVData sd;
|
||||
sd.shader_stage = stage;
|
||||
String error = p_spirv->get_stage_compile_error(stage);
|
||||
ERR_FAIL_COND_V_MSG(error != String(), RID(), "Can't create a shader from an errored bytecode. Check errors in source bytecode.");
|
||||
ERR_FAIL_COND_V_MSG(!error.is_empty(), RID(), "Can't create a shader from an errored bytecode. Check errors in source bytecode.");
|
||||
sd.spir_v = p_spirv->get_stage_bytecode(stage);
|
||||
if (sd.spir_v.is_empty()) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue