mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Improve usage of String.split() vs get_slice()
This commit is contained in:
parent
2753d333f6
commit
d61a337a70
17 changed files with 45 additions and 50 deletions
|
|
@ -1879,7 +1879,7 @@ void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
|
|||
}
|
||||
|
||||
// Parse back the `file:line @ method()` string.
|
||||
const Vector<String> file_line_number = ci->get_text(1).split("@")[0].strip_edges().split(":");
|
||||
const Vector<String> file_line_number = ci->get_text(1).get_slicec('@', 0).strip_edges().split(":");
|
||||
ERR_FAIL_COND_MSG(file_line_number.size() < 2, "Incorrect C++ source stack trace file:line format (please report).");
|
||||
const String &file = file_line_number[0];
|
||||
const int line_number = file_line_number[1].to_int();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue