From cb282c6ef0bb91957f8a6f422705813bd47c788c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 17 Mar 2020 07:33:00 +0100 Subject: Style: Set clang-format Standard to Cpp11 For us, it practically only changes the fact that `A>` is now used instead of the C++03 compatible `A >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`. --- modules/gdnative/nativescript/nativescript.cpp | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/gdnative/nativescript/nativescript.cpp') 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 > erase_and_unload; + Map> erase_and_unload; - for (Map >::Element *L = library_classes.front(); L; L = L->next()) { + for (Map>::Element *L = library_classes.front(); L; L = L->next()) { String lib_path = L->key(); Map classes = L->get(); if (p_reload) { - Map >::Element *E = library_gdnatives.find(lib_path); + Map>::Element *E = library_gdnatives.find(lib_path); Ref gdn; if (E) { @@ -1169,7 +1169,7 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) { } } - Map >::Element *E = library_gdnatives.find(lib_path); + Map>::Element *E = library_gdnatives.find(lib_path); Ref gdn; if (E) { @@ -1204,7 +1204,7 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) { erase_and_unload.insert(lib_path, gdn); } - for (Map >::Element *E = erase_and_unload.front(); E; E = E->next()) { + for (Map>::Element *E = erase_and_unload.front(); E; E = E->next()) { String lib_path = E->key(); Ref gdn = E->get(); @@ -1247,7 +1247,7 @@ NativeScriptLanguage::NativeScriptLanguage() { NativeScriptLanguage::~NativeScriptLanguage() { - for (Map >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { + for (Map>::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { Ref lib = L->get(); // only shut down valid libs, duh! @@ -1385,7 +1385,7 @@ void NativeScriptLanguage::get_recognized_extensions(List *p_extensions) void NativeScriptLanguage::get_public_functions(List *p_functions) const { } -void NativeScriptLanguage::get_public_constants(List > *p_constants) const { +void NativeScriptLanguage::get_public_constants(List> *p_constants) const { } void NativeScriptLanguage::profiling_start() { @@ -1679,7 +1679,7 @@ void NativeScriptLanguage::init_library(const Ref &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 >::Element *E = library_gdnatives.find(lib_path); + Map>::Element *E = library_gdnatives.find(lib_path); if (!E) { Ref gdn; @@ -1719,7 +1719,7 @@ void NativeScriptLanguage::register_script(NativeScript *script) { void NativeScriptLanguage::unregister_script(NativeScript *script) { MutexLock lock(mutex); - Map >::Element *S = library_script_users.find(script->lib_path); + Map>::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 >::Element *L = library_gdnatives.front(); L; L = L->next()) { + for (Map>::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 >::Element *L = libs_to_init.front(); L; L = L->next()) { + for (Set>::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 >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { + for (Map>::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { Ref gdn = L->get(); @@ -1869,7 +1869,7 @@ void NativeReloadNode::_notification(int p_what) { MutexLock lock(NSL->mutex); Set libs_to_remove; - for (Map >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { + for (Map>::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) { Ref gdn = L->get(); @@ -1904,7 +1904,7 @@ void NativeReloadNode::_notification(int p_what) { ((void (*)(void *))proc_ptr)((void *)&L->key()); } - for (Map >::Element *U = NSL->library_script_users.front(); U; U = U->next()) { + for (Map>::Element *U = NSL->library_script_users.front(); U; U = U->next()) { for (Set::Element *S = U->get().front(); S; S = S->next()) { NativeScript *script = S->get(); -- cgit v1.2.3