diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/config/project_settings.cpp | 2 | ||||
-rw-r--r-- | core/templates/local_vector.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index ee20aea35d..a0412e91ff 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -253,7 +253,7 @@ bool ProjectSettings::get_ignore_value_in_docs(const String &p_name) const { } void ProjectSettings::add_hidden_prefix(const String &p_prefix) { - ERR_FAIL_COND_MSG(hidden_prefixes.find(p_prefix) > -1, vformat("Hidden prefix '%s' already exists.", p_prefix)); + ERR_FAIL_COND_MSG(hidden_prefixes.has(p_prefix), vformat("Hidden prefix '%s' already exists.", p_prefix)); hidden_prefixes.push_back(p_prefix); } diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h index e0047e0782..c281d70d92 100644 --- a/core/templates/local_vector.h +++ b/core/templates/local_vector.h @@ -264,6 +264,10 @@ public: return -1; } + bool has(const T &p_val) const { + return find(p_val) != -1; + } + template <typename C> void sort_custom() { U len = count; |