summaryrefslogtreecommitdiff
path: root/editor/shader_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/shader_create_dialog.cpp')
-rw-r--r--editor/shader_create_dialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index a958226394..302f7f78c5 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -220,7 +220,7 @@ void ShaderCreateDialog::_language_changed(int p_language) {
String path = file_path->get_text();
String extension = "";
- if (path != "") {
+ if (!path.is_empty()) {
if (path.find(".") != -1) {
extension = path.get_extension();
}
@@ -303,7 +303,7 @@ void ShaderCreateDialog::_path_changed(const String &p_path) {
is_new_shader_created = true;
String path_error = _validate_path(p_path);
- if (path_error != "") {
+ if (!path_error.is_empty()) {
_msg_path_valid(false, path_error);
_update_dialog();
return;
@@ -325,7 +325,7 @@ void ShaderCreateDialog::_path_submitted(const String &p_path) {
}
void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabled, bool p_load_enabled, int p_preferred_type, int p_preferred_mode) {
- if (p_base_path != "") {
+ if (!p_base_path.is_empty()) {
initial_base_path = p_base_path.get_basename();
file_path->set_text(initial_base_path + "." + language_data[language_menu->get_selected()].default_extension);
current_language = language_menu->get_selected();
@@ -355,10 +355,10 @@ void ShaderCreateDialog::config(const String &p_base_path, bool p_built_in_enabl
String ShaderCreateDialog::_validate_path(const String &p_path) {
String p = p_path.strip_edges();
- if (p == "") {
+ if (p.is_empty()) {
return TTR("Path is empty.");
}
- if (p.get_file().get_basename() == "") {
+ if (p.get_file().get_basename().is_empty()) {
return TTR("Filename is empty.");
}