You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10: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:
@@ -2861,7 +2861,7 @@ void RendererStorageRD::MaterialData::update_textures(const Map<StringName, Vari
|
||||
}
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (roughness_detect_texture && normal_detect_texture && normal_detect_texture->path != String()) {
|
||||
if (roughness_detect_texture && normal_detect_texture && !normal_detect_texture->path.is_empty()) {
|
||||
roughness_detect_texture->detect_roughness_callback(roughness_detect_texture->detect_roughness_callback_ud, normal_detect_texture->path, roughness_channel);
|
||||
}
|
||||
#endif
|
||||
@@ -2901,7 +2901,7 @@ void RendererStorageRD::MaterialData::update_textures(const Map<StringName, Vari
|
||||
rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_WHITE);
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (roughness_detect_texture && normal_detect_texture && normal_detect_texture->path != String()) {
|
||||
if (roughness_detect_texture && normal_detect_texture && !normal_detect_texture->path.is_empty()) {
|
||||
roughness_detect_texture->detect_roughness_callback(roughness_detect_texture->detect_roughness_callback_ud, normal_detect_texture->path, roughness_channel);
|
||||
}
|
||||
#endif
|
||||
@@ -5820,7 +5820,7 @@ void RendererStorageRD::ParticlesShaderData::set_code(const String &p_code) {
|
||||
uniforms.clear();
|
||||
uses_collision = false;
|
||||
|
||||
if (code == String()) {
|
||||
if (code.is_empty()) {
|
||||
return; //just invalid, but no error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user