diff options
author | Max Hilbrunner <m.hilbrunner@gmail.com> | 2021-08-17 15:06:54 +0200 |
---|---|---|
committer | Max Hilbrunner <m.hilbrunner@gmail.com> | 2021-08-17 16:10:28 +0200 |
commit | 5161c97c9c7d6c1f6e4d0264fd9a9d9ea7f7be27 (patch) | |
tree | 08f24b87781f70b0ffa849bb771d0b644123379f /modules/gdscript/gdscript.cpp | |
parent | 81f7d1890baf0481f65100aa0efa875da0a0fa30 (diff) | |
download | redot-engine-5161c97c9c7d6c1f6e4d0264fd9a9d9ea7f7be27.tar.gz |
Remove underscore hacks
Way less cruft. :)
Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r-- | modules/gdscript/gdscript.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 8957b00a1b..4589cf1a36 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1644,16 +1644,11 @@ void GDScriptLanguage::init() { List<StringName> class_list; ClassDB::get_class_list(&class_list); for (const StringName &n : class_list) { - String s = String(n); - if (s.begins_with("_")) { - s = s.substr(1, s.length()); - } - - if (globals.has(s)) { + if (globals.has(n)) { continue; } Ref<GDScriptNativeClass> nc = memnew(GDScriptNativeClass(n)); - _add_global(s, nc); + _add_global(n, nc); } //populate singletons |