summaryrefslogtreecommitdiffstats
path: root/editor/inspector_dock.cpp
diff options
context:
space:
mode:
authorNathan Franke <natfra@pm.me>2021-12-09 03:42:46 -0600
committerNathan Franke <natfra@pm.me>2021-12-09 04:48:38 -0600
commit49403cbfa0399bb4284ea5c36cc90216a0bda6ff (patch)
treecaa6c7249d35d83b288a180a4f5d7e4fd959704f /editor/inspector_dock.cpp
parent31ded7e126b9d71ed8dddab9ffc1ce813f1a8ec2 (diff)
downloadredot-engine-49403cbfa0399bb4284ea5c36cc90216a0bda6ff.tar.gz
Replace String comparisons with "", String() to is_empty()
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
Diffstat (limited to 'editor/inspector_dock.cpp')
-rw-r--r--editor/inspector_dock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 5622d0b145..f594a5a3a8 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -312,7 +312,7 @@ void InspectorDock::_prepare_history() {
Resource *r = Object::cast_to<Resource>(obj);
if (r->get_path().is_resource_file()) {
text = r->get_path().get_file();
- } else if (r->get_name() != String()) {
+ } else if (!r->get_name().is_empty()) {
text = r->get_name();
} else {
text = r->get_class();
@@ -460,7 +460,7 @@ void InspectorDock::open_resource(const String &p_type) {
void InspectorDock::set_warning(const String &p_message) {
warning->hide();
- if (p_message != String()) {
+ if (!p_message.is_empty()) {
warning->show();
warning_dialog->set_text(p_message);
}