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
|
|
@ -553,7 +553,7 @@ Error StreamTexture2D::load(const String &p_path) {
|
|||
path_to_file = p_path;
|
||||
format = image->get_format();
|
||||
|
||||
if (get_path() == String()) {
|
||||
if (get_path().is_empty()) {
|
||||
//temporarily set path if no path set for resource, helps find errors
|
||||
RenderingServer::get_singleton()->texture_set_path(texture, p_path);
|
||||
}
|
||||
|
|
@ -927,7 +927,7 @@ Error StreamTexture3D::load(const String &p_path) {
|
|||
|
||||
path_to_file = p_path;
|
||||
|
||||
if (get_path() == String()) {
|
||||
if (get_path().is_empty()) {
|
||||
//temporarily set path if no path set for resource, helps find errors
|
||||
RenderingServer::get_singleton()->texture_set_path(texture, p_path);
|
||||
}
|
||||
|
|
@ -2680,7 +2680,7 @@ Error StreamTextureLayered::load(const String &p_path) {
|
|||
|
||||
path_to_file = p_path;
|
||||
|
||||
if (get_path() == String()) {
|
||||
if (get_path().is_empty()) {
|
||||
//temporarily set path if no path set for resource, helps find errors
|
||||
RenderingServer::get_singleton()->texture_set_path(texture, p_path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue