Use get_slicec instead of get_slice for single character splitters

This commit is contained in:
A Thousand Ships 2024-11-16 17:16:07 +01:00
parent b5bdb88062
commit 466590d0ec
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
58 changed files with 210 additions and 210 deletions

View file

@ -1704,8 +1704,8 @@ void EditorHelp::_update_doc() {
for (KeyValue<String, Vector<DocData::ConstantDoc>> &E : enums) {
String key = E.key;
if ((key.get_slice_count(".") > 1) && (key.get_slice(".", 0) == edited_class)) {
key = key.get_slice(".", 1);
if ((key.get_slice_count(".") > 1) && (key.get_slicec('.', 0) == edited_class)) {
key = key.get_slicec('.', 1);
}
if (cd.enums.has(key)) {
const bool is_documented = cd.enums[key].is_deprecated || cd.enums[key].is_experimental || !cd.enums[key].description.strip_edges().is_empty();
@ -2334,11 +2334,11 @@ void EditorHelp::_request_help(const String &p_string) {
}
void EditorHelp::_help_callback(const String &p_topic) {
String what = p_topic.get_slice(":", 0);
String clss = p_topic.get_slice(":", 1);
String what = p_topic.get_slicec(':', 0);
String clss = p_topic.get_slicec(':', 1);
String name;
if (p_topic.get_slice_count(":") == 3) {
name = p_topic.get_slice(":", 2);
name = p_topic.get_slicec(':', 2);
}
_request_help(clss); // First go to class.