You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +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:
@@ -40,7 +40,7 @@
|
||||
|
||||
static String get_type_name(const PropertyInfo &p_info) {
|
||||
if (p_info.type == Variant::INT && (p_info.hint == PROPERTY_HINT_INT_IS_POINTER)) {
|
||||
if (p_info.hint_string == "") {
|
||||
if (p_info.hint_string.is_empty()) {
|
||||
return "void*";
|
||||
} else {
|
||||
return p_info.hint_string + "*";
|
||||
@@ -340,7 +340,7 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() {
|
||||
int value = CoreConstants::get_global_constant_value(i);
|
||||
String enum_name = CoreConstants::get_global_constant_enum(i);
|
||||
String name = CoreConstants::get_global_constant_name(i);
|
||||
if (enum_name != String()) {
|
||||
if (!enum_name.is_empty()) {
|
||||
enum_list[enum_name].push_back(Pair<String, int>(name, value));
|
||||
} else {
|
||||
Dictionary d;
|
||||
|
||||
Reference in New Issue
Block a user