mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +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
|
|
@ -1534,7 +1534,7 @@ void CodeTextEditor::set_edit_state(const Variant &p_state) {
|
|||
|
||||
void CodeTextEditor::set_error(const String &p_error) {
|
||||
error->set_text(p_error);
|
||||
if (p_error != "") {
|
||||
if (!p_error.is_empty()) {
|
||||
error->set_default_cursor_shape(CURSOR_POINTING_HAND);
|
||||
} else {
|
||||
error->set_default_cursor_shape(CURSOR_ARROW);
|
||||
|
|
@ -1547,7 +1547,7 @@ void CodeTextEditor::set_error_pos(int p_line, int p_column) {
|
|||
}
|
||||
|
||||
void CodeTextEditor::goto_error() {
|
||||
if (error->get_text() != "") {
|
||||
if (!error->get_text().is_empty()) {
|
||||
text_editor->unfold_line(error_line);
|
||||
text_editor->set_caret_line(error_line);
|
||||
text_editor->set_caret_column(error_column);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue