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
|
|
@ -1565,7 +1565,7 @@ String DisplayServerWindows::keyboard_get_layout_name(int p_index) const {
|
|||
GetKeyboardLayoutList(layout_count, layouts);
|
||||
|
||||
String ret = _get_full_layout_name_from_registry(layouts[p_index]); // Try reading full name from Windows registry, fallback to locale name if failed (e.g. on Wine).
|
||||
if (ret == String()) {
|
||||
if (ret.is_empty()) {
|
||||
WCHAR buf[LOCALE_NAME_MAX_LENGTH];
|
||||
memset(buf, 0, LOCALE_NAME_MAX_LENGTH * sizeof(WCHAR));
|
||||
LCIDToLocaleName(MAKELCID(LOWORD(layouts[p_index]), SORT_DEFAULT), buf, LOCALE_NAME_MAX_LENGTH, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue