mirror of
https://github.com/godotengine/godot.git
synced 2025-10-30 05:01:10 +00:00
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
This commit is contained in:
parent
07bc4e2f96
commit
0ee0fa42e6
683 changed files with 22803 additions and 12225 deletions
|
|
@ -204,8 +204,9 @@ void GDAPI godot_nativescript_register_signal(void *p_gdnative_handle, const cha
|
|||
|
||||
void GDAPI *godot_nativescript_get_userdata(godot_object *p_instance) {
|
||||
Object *instance = (Object *)p_instance;
|
||||
if (!instance)
|
||||
if (!instance) {
|
||||
return nullptr;
|
||||
}
|
||||
if (instance->get_script_instance() && instance->get_script_instance()->get_language() == NativeScriptLanguage::get_singleton()) {
|
||||
return ((NativeScriptInstance *)instance->get_script_instance())->userdata;
|
||||
}
|
||||
|
|
@ -320,8 +321,9 @@ const void GDAPI *godot_nativescript_get_type_tag(const godot_object *p_object)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (script->get_script_desc())
|
||||
if (script->get_script_desc()) {
|
||||
return script->get_script_desc()->type_tag;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue