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
|
|
@ -242,7 +242,7 @@ Button *AcceptDialog::add_button(const String &p_text, bool p_right, const Strin
|
|||
hbc->add_spacer(true);
|
||||
}
|
||||
|
||||
if (p_action != "") {
|
||||
if (!p_action.is_empty()) {
|
||||
button->connect("pressed", callable_mp(this, &AcceptDialog::_custom_action), varray(p_action));
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ Button *AcceptDialog::add_button(const String &p_text, bool p_right, const Strin
|
|||
|
||||
Button *AcceptDialog::add_cancel_button(const String &p_cancel) {
|
||||
String c = p_cancel;
|
||||
if (p_cancel == "") {
|
||||
if (p_cancel.is_empty()) {
|
||||
c = TTRC("Cancel");
|
||||
}
|
||||
Button *b = swap_cancel_ok ? add_button(c, true) : add_button(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue