summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2024-02-26 10:46:24 +0300
committerDanil Alexeev <danil@alexeev.xyz>2024-02-26 10:46:24 +0300
commit8ffc50ee8ce2a8ee8a59334bc500a0f46198c904 (patch)
treef22716c1f8a29aaf78b2ab5187841f8c2525743d /modules/gdscript/gdscript.cpp
parent81f3d43cc1ba01136795fb2059bbaa55bc514a16 (diff)
downloadredot-engine-8ffc50ee8ce2a8ee8a59334bc500a0f46198c904.tar.gz
GDScript: Canonicalize script path in FQCN
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 20d7fdb601..2d6c0c1d11 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -1405,16 +1405,11 @@ String GDScript::debug_get_script_name(const Ref<Script> &p_script) {
}
#endif
-bool GDScript::is_equal_gdscript_paths(const String &p_path_a, const String &p_path_b) {
- String path_a = p_path_a;
- if (path_a.get_extension() == "gdc") {
- path_a = path_a.get_basename() + ".gd";
+String GDScript::canonicalize_path(const String &p_path) {
+ if (p_path.get_extension() == "gdc") {
+ return p_path.get_basename() + ".gd";
}
- String path_b = p_path_b;
- if (path_b.get_extension() == "gdc") {
- path_b = path_b.get_basename() + ".gd";
- }
- return path_a == path_b;
+ return p_path;
}
GDScript::UpdatableFuncPtr::UpdatableFuncPtr(GDScriptFunction *p_function) {