diff options
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/gdnative.cpp | 6 | ||||
-rw-r--r-- | modules/gdnative/gdnative.h | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/api_generator.cpp | 6 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 28 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.h | 14 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_language.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_language.h | 2 | ||||
-rw-r--r-- | modules/gdnative/register_types.cpp | 2 |
8 files changed, 31 insertions, 31 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 33b734f672..0457a42f30 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -48,7 +48,7 @@ static const bool default_reloadable = true; // Defined in gdnative_api_struct.gen.cpp extern const godot_gdnative_core_api_struct api_struct; -Map<String, Vector<Ref<GDNative> > > GDNativeLibrary::loaded_libraries; +Map<String, Vector<Ref<GDNative>>> GDNativeLibrary::loaded_libraries; GDNativeLibrary::GDNativeLibrary() { config_file.instance(); @@ -373,7 +373,7 @@ bool GDNative::initialize() { initialized = true; if (library->should_load_once() && !GDNativeLibrary::loaded_libraries.has(lib_path)) { - Vector<Ref<GDNative> > gdnatives; + Vector<Ref<GDNative>> gdnatives; gdnatives.resize(1); gdnatives.write[0] = Ref<GDNative>(this); GDNativeLibrary::loaded_libraries.insert(lib_path, gdnatives); @@ -390,7 +390,7 @@ bool GDNative::terminate() { } if (library->should_load_once()) { - Vector<Ref<GDNative> > *gdnatives = &GDNativeLibrary::loaded_libraries[library->get_current_library_path()]; + Vector<Ref<GDNative>> *gdnatives = &GDNativeLibrary::loaded_libraries[library->get_current_library_path()]; if (gdnatives->size() > 1) { // there are other GDNative's still using this library, so we actually don't terminate gdnatives->erase(Ref<GDNative>(this)); diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h index b4c5ec9d00..9ef9c706d1 100644 --- a/modules/gdnative/gdnative.h +++ b/modules/gdnative/gdnative.h @@ -47,7 +47,7 @@ class GDNative; class GDNativeLibrary : public Resource { GDCLASS(GDNativeLibrary, Resource); - static Map<String, Vector<Ref<GDNative> > > loaded_libraries; + static Map<String, Vector<Ref<GDNative>>> loaded_libraries; friend class GDNativeLibraryResourceLoader; friend class GDNative; diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index 850871579b..11fe746e90 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -98,7 +98,7 @@ struct SignalAPI { struct EnumAPI { String name; - List<Pair<int, String> > values; + List<Pair<int, String>> values; }; struct ClassAPI { @@ -395,7 +395,7 @@ List<ClassAPI> generate_c_api_classes() { int int_val = ClassDB::get_integer_constant(class_name, val_e->get(), NULL); enum_api.values.push_back(Pair<int, String>(int_val, val_e->get())); } - enum_api.values.sort_custom<PairSort<int, String> >(); + enum_api.values.sort_custom<PairSort<int, String>>(); class_api.enums.push_back(enum_api); } } @@ -497,7 +497,7 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) { source.push_back("\t\t\t{\n"); source.push_back("\t\t\t\t\"name\": \"" + e->get().name + "\",\n"); source.push_back("\t\t\t\t\"values\": {\n"); - for (List<Pair<int, String> >::Element *val_e = e->get().values.front(); val_e; val_e = val_e->next()) { + for (List<Pair<int, String>>::Element *val_e = e->get().values.front(); val_e; val_e = val_e->next()) { source.push_back("\t\t\t\t\t\"" + val_e->get().second + "\": " + itos(val_e->get().first)); source.push_back(String((val_e->next() ? "," : "")) + "\n"); } diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index d0e196b3e6..fb88479ca3 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -1139,16 +1139,16 @@ NativeScriptLanguage *NativeScriptLanguage::singleton; void NativeScriptLanguage::_unload_stuff(bool p_reload) { - Map<String, Ref<GDNative> > erase_and_unload; + Map<String, Ref<GDNative>> erase_and_unload; - for (Map<String, Map<StringName, NativeScriptDesc> >::Element *L = library_classes.front(); L; L = L->next()) { + for (Map<String, Map<StringName, NativeScriptDesc>>::Element *L = library_classes.front(); L; L = L->next()) { String lib_path = L->key(); Map<StringName, NativeScriptDesc> classes = L->get(); if (p_reload) { - Map<String, Ref<GDNative> >::Element *E = library_gdnatives.find(lib_path); + Map<String, Ref<GDNative>>::Element *E = library_gdnatives.find(lib_path); Ref<GDNative> gdn; if (E) { @@ -1169,7 +1169,7 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) { } } - Map<String, Ref<GDNative> >::Element *E = library_gdnatives.find(lib_path); + Map<String, Ref<GDNative>>::Element *E = library_gdnatives.find(lib_path); Ref<GDNative> gdn; if (E) { @@ -1204,7 +1204,7 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) { erase_and_unload.insert(lib_path, gdn); } - for (Map<String, Ref<GDNative> >::Element *E = erase_and_unload.front(); E; E = E->next()) { + for (Map<String, Ref<GDNative>>::Element *E = erase_and_unload.front(); E; E = E->next()) { String lib_path = E->key(); Ref<GDNative> gdn = E->get(); @@ -1247,7 +1247,7 @@ NativeScriptLanguage::NativeScriptLanguage() { NativeScriptLanguage::~NativeScriptLanguage() { - for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { + for (Map<String, Ref<GDNative>>::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { Ref<GDNative> lib = L->get(); // only shut down valid libs, duh! @@ -1385,7 +1385,7 @@ void NativeScriptLanguage::get_recognized_extensions(List<String> *p_extensions) void NativeScriptLanguage::get_public_functions(List<MethodInfo> *p_functions) const { } -void NativeScriptLanguage::get_public_constants(List<Pair<String, Variant> > *p_constants) const { +void NativeScriptLanguage::get_public_constants(List<Pair<String, Variant>> *p_constants) const { } void NativeScriptLanguage::profiling_start() { @@ -1679,7 +1679,7 @@ void NativeScriptLanguage::init_library(const Ref<GDNativeLibrary> &lib) { // See if this library was "registered" already. const String &lib_path = lib->get_current_library_path(); ERR_FAIL_COND_MSG(lib_path.length() == 0, lib->get_name() + " does not have a library for the current platform."); - Map<String, Ref<GDNative> >::Element *E = library_gdnatives.find(lib_path); + Map<String, Ref<GDNative>>::Element *E = library_gdnatives.find(lib_path); if (!E) { Ref<GDNative> gdn; @@ -1719,7 +1719,7 @@ void NativeScriptLanguage::register_script(NativeScript *script) { void NativeScriptLanguage::unregister_script(NativeScript *script) { MutexLock lock(mutex); - Map<String, Set<NativeScript *> >::Element *S = library_script_users.find(script->lib_path); + Map<String, Set<NativeScript *>>::Element *S = library_script_users.find(script->lib_path); if (S) { S->get().erase(script); if (S->get().size() == 0) { @@ -1733,7 +1733,7 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) { void NativeScriptLanguage::call_libraries_cb(const StringName &name) { // library_gdnatives is modified only from the main thread, so it's safe not to use mutex here - for (Map<String, Ref<GDNative> >::Element *L = library_gdnatives.front(); L; L = L->next()) { + for (Map<String, Ref<GDNative>>::Element *L = library_gdnatives.front(); L; L = L->next()) { if (L->get().is_null()) { continue; @@ -1755,7 +1755,7 @@ void NativeScriptLanguage::frame() { #ifndef NO_THREADS if (has_objects_to_register) { MutexLock lock(mutex); - for (Set<Ref<GDNativeLibrary> >::Element *L = libs_to_init.front(); L; L = L->next()) { + for (Set<Ref<GDNativeLibrary>>::Element *L = libs_to_init.front(); L; L = L->next()) { init_library(L->get()); } libs_to_init.clear(); @@ -1834,7 +1834,7 @@ void NativeReloadNode::_notification(int p_what) { MutexLock lock(NSL->mutex); NSL->_unload_stuff(true); - for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { + for (Map<String, Ref<GDNative>>::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { Ref<GDNative> gdn = L->get(); @@ -1869,7 +1869,7 @@ void NativeReloadNode::_notification(int p_what) { MutexLock lock(NSL->mutex); Set<StringName> libs_to_remove; - for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { + for (Map<String, Ref<GDNative>>::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { Ref<GDNative> gdn = L->get(); @@ -1904,7 +1904,7 @@ void NativeReloadNode::_notification(int p_what) { ((void (*)(void *))proc_ptr)((void *)&L->key()); } - for (Map<String, Set<NativeScript *> >::Element *U = NSL->library_script_users.front(); U; U = U->next()) { + for (Map<String, Set<NativeScript *>>::Element *U = NSL->library_script_users.front(); U; U = U->next()) { for (Set<NativeScript *>::Element *S = U->get().front(); S; S = S->next()) { NativeScript *script = S->get(); diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index 90542c96b7..aba3f6b2d0 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -263,7 +263,7 @@ private: Mutex mutex; #ifndef NO_THREADS - Set<Ref<GDNativeLibrary> > libs_to_init; + Set<Ref<GDNativeLibrary>> libs_to_init; Set<NativeScript *> scripts_to_register; volatile bool has_objects_to_register; // so that we don't lock mutex every frame - it's rarely needed void defer_init_library(Ref<GDNativeLibrary> lib, NativeScript *script); @@ -275,10 +275,10 @@ private: void call_libraries_cb(const StringName &name); - Vector<Pair<bool, godot_instance_binding_functions> > binding_functions; + Vector<Pair<bool, godot_instance_binding_functions>> binding_functions; Set<Vector<void *> *> binding_instances; - Map<int, HashMap<StringName, const void *> > global_type_tags; + Map<int, HashMap<StringName, const void *>> global_type_tags; struct ProfileData { StringName signature; @@ -298,10 +298,10 @@ private: public: // These two maps must only be touched on the main thread - Map<String, Map<StringName, NativeScriptDesc> > library_classes; - Map<String, Ref<GDNative> > library_gdnatives; + Map<String, Map<StringName, NativeScriptDesc>> library_classes; + Map<String, Ref<GDNative>> library_gdnatives; - Map<String, Set<NativeScript *> > library_script_users; + Map<String, Set<NativeScript *>> library_script_users; StringName _init_call_type; StringName _init_call_name; @@ -362,7 +362,7 @@ public: virtual void reload_tool_script(const Ref<Script> &p_script, bool p_soft_reload); virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual void get_public_functions(List<MethodInfo> *p_functions) const; - virtual void get_public_constants(List<Pair<String, Variant> > *p_constants) const; + virtual void get_public_constants(List<Pair<String, Variant>> *p_constants) const; virtual void profiling_start(); virtual void profiling_stop(); virtual int profiling_get_accumulated_data(ProfilingInfo *p_info_arr, int p_info_max); diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index a40b59bb2e..bccbe95033 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -210,7 +210,7 @@ void PluginScriptLanguage::get_public_functions(List<MethodInfo> *p_functions) c } } -void PluginScriptLanguage::get_public_constants(List<Pair<String, Variant> > *p_constants) const { +void PluginScriptLanguage::get_public_constants(List<Pair<String, Variant>> *p_constants) const { // TODO: provide this statically in `godot_pluginscript_language_desc` ? if (_desc.get_public_constants) { Dictionary constants; diff --git a/modules/gdnative/pluginscript/pluginscript_language.h b/modules/gdnative/pluginscript/pluginscript_language.h index 3f0d2b8d3d..809034744a 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.h +++ b/modules/gdnative/pluginscript/pluginscript_language.h @@ -112,7 +112,7 @@ public: virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual void get_public_functions(List<MethodInfo> *p_functions) const; - virtual void get_public_constants(List<Pair<String, Variant> > *p_constants) const; + virtual void get_public_constants(List<Pair<String, Variant>> *p_constants) const; virtual void profiling_start(); virtual void profiling_stop(); diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp index e5d688afd4..397a020689 100644 --- a/modules/gdnative/register_types.cpp +++ b/modules/gdnative/register_types.cpp @@ -214,7 +214,7 @@ static godot_variant cb_standard_varcall(void *p_procedure_handle, godot_array * GDNativeCallRegistry *GDNativeCallRegistry::singleton; -Vector<Ref<GDNative> > singleton_gdnatives; +Vector<Ref<GDNative>> singleton_gdnatives; Ref<GDNativeLibraryResourceLoader> resource_loader_gdnlib; Ref<GDNativeLibraryResourceSaver> resource_saver_gdnlib; |