diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:41:43 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 21:57:34 +0200 |
| commit | 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (patch) | |
| tree | 198d4ff7665d89307f6ca2469fa38620a9eb1672 /modules/gdnative/gdnative.cpp | |
| parent | 07bc4e2f96f8f47991339654ff4ab16acc19d44f (diff) | |
| download | redot-engine-0ee0fa42e6639b6fa474b7cf6afc6b1a78142185.tar.gz | |
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
| -rw-r--r-- | modules/gdnative/gdnative.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 7a231ac903..3d747ba41e 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -114,8 +114,9 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const { // set entries List<String> entry_key_list; - if (config_file->has_section("entry")) + if (config_file->has_section("entry")) { config_file->get_section_keys("entry", &entry_key_list); + } for (List<String>::Element *E = entry_key_list.front(); E; E = E->next()) { String key = E->get(); @@ -131,8 +132,9 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const { // set dependencies List<String> dependency_key_list; - if (config_file->has_section("dependencies")) + if (config_file->has_section("dependencies")) { config_file->get_section_keys("dependencies", &dependency_key_list); + } for (List<String>::Element *E = dependency_key_list.front(); E; E = E->next()) { String key = E->get(); @@ -156,8 +158,9 @@ void GDNativeLibrary::set_config_file(Ref<ConfigFile> p_config_file) { { List<String> entry_keys; - if (p_config_file->has_section("entry")) + if (p_config_file->has_section("entry")) { p_config_file->get_section_keys("entry", &entry_keys); + } for (List<String>::Element *E = entry_keys.front(); E; E = E->next()) { String key = E->get(); @@ -187,8 +190,9 @@ void GDNativeLibrary::set_config_file(Ref<ConfigFile> p_config_file) { { List<String> dependency_keys; - if (p_config_file->has_section("dependencies")) + if (p_config_file->has_section("dependencies")) { p_config_file->get_section_keys("dependencies", &dependency_keys); + } for (List<String>::Element *E = dependency_keys.front(); E; E = E->next()) { String key = E->get(); @@ -513,8 +517,9 @@ bool GDNativeLibraryResourceLoader::handles_type(const String &p_type) const { String GDNativeLibraryResourceLoader::get_resource_type(const String &p_path) const { String el = p_path.get_extension().to_lower(); - if (el == "gdnlib") + if (el == "gdnlib") { return "GDNativeLibrary"; + } return ""; } |
