Style: Sync other changes from new fix_style.sh and clang_format.sh
This commit is contained in:
parent
eda03831d6
commit
b40f3f9740
74 changed files with 116 additions and 86 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* object_rc.h */
|
/* object_id.h */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
|
|
|
@ -203,10 +203,10 @@
|
||||||
<description>
|
<description>
|
||||||
Returns [code]true[/code] if the array contains the given value.
|
Returns [code]true[/code] if the array contains the given value.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
["inside", 7].has("inside") == true
|
["inside", 7].has("inside") # True
|
||||||
["inside", 7].has("outside") == false
|
["inside", 7].has("outside") # False
|
||||||
["inside", 7].has(7) == true
|
["inside", 7].has(7) # True
|
||||||
["inside", 7].has("7") == false
|
["inside", 7].has("7") # False
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
|
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<description>
|
<description>
|
||||||
Updates the collision information for the ray.
|
Updates the collision information for the ray.
|
||||||
Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
|
Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
|
||||||
[b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
|
[b]Note:[/b] [code]enabled[/code] is not required for this to work.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_collider" qualifiers="const">
|
<method name="get_collider" qualifiers="const">
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
|
Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
|
||||||
[b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
|
[b]Note:[/b] [code]enabled[/code] is not required for this to work.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_collider" qualifiers="const">
|
<method name="get_collider" qualifiers="const">
|
||||||
|
|
|
@ -1,3 +1,33 @@
|
||||||
|
/*************************************************************************/
|
||||||
|
/* rasterizer_array_gles2.h */
|
||||||
|
/*************************************************************************/
|
||||||
|
/* This file is part of: */
|
||||||
|
/* GODOT ENGINE */
|
||||||
|
/* https://godotengine.org */
|
||||||
|
/*************************************************************************/
|
||||||
|
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||||
|
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||||
|
/* */
|
||||||
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||||
|
/* a copy of this software and associated documentation files (the */
|
||||||
|
/* "Software"), to deal in the Software without restriction, including */
|
||||||
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||||
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||||
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||||
|
/* the following conditions: */
|
||||||
|
/* */
|
||||||
|
/* The above copyright notice and this permission notice shall be */
|
||||||
|
/* included in all copies or substantial portions of the Software. */
|
||||||
|
/* */
|
||||||
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||||
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||||
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
||||||
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||||
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||||
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
/*************************************************************************/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
|
@ -102,9 +102,9 @@ bool test_add_remove() {
|
||||||
a.connect_points(1, 3, true);
|
a.connect_points(1, 3, true);
|
||||||
a.connect_points(1, 4, false);
|
a.connect_points(1, 4, false);
|
||||||
|
|
||||||
ok = ok && (a.are_points_connected(2, 1) == true);
|
ok = ok && (a.are_points_connected(2, 1));
|
||||||
ok = ok && (a.are_points_connected(4, 1) == true);
|
ok = ok && (a.are_points_connected(4, 1));
|
||||||
ok = ok && (a.are_points_connected(2, 1, false) == true);
|
ok = ok && (a.are_points_connected(2, 1, false));
|
||||||
ok = ok && (a.are_points_connected(4, 1, false) == false);
|
ok = ok && (a.are_points_connected(4, 1, false) == false);
|
||||||
|
|
||||||
a.disconnect_points(1, 2, true);
|
a.disconnect_points(1, 2, true);
|
||||||
|
@ -177,7 +177,7 @@ bool test_add_remove() {
|
||||||
if (Math::rand() % 2 == 1) {
|
if (Math::rand() % 2 == 1) {
|
||||||
// Add a (possibly existing) directed edge and confirm connectivity
|
// Add a (possibly existing) directed edge and confirm connectivity
|
||||||
a.connect_points(u, v, false);
|
a.connect_points(u, v, false);
|
||||||
ok = ok && (a.are_points_connected(u, v, false) == true);
|
ok = ok && (a.are_points_connected(u, v, false));
|
||||||
} else {
|
} else {
|
||||||
// Remove a (possibly nonexistent) directed edge and confirm disconnectivity
|
// Remove a (possibly nonexistent) directed edge and confirm disconnectivity
|
||||||
a.disconnect_points(u, v, false);
|
a.disconnect_points(u, v, false);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* test_fbx.cpp */
|
/* test_basis.cpp */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* test_fbx.h */
|
/* test_basis.h */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
|
|
|
@ -1864,7 +1864,7 @@ MonoObject *CSharpInstance::_internal_new_managed() {
|
||||||
|
|
||||||
bool die = _unreference_owner_unsafe();
|
bool die = _unreference_owner_unsafe();
|
||||||
// Not ok for the owner to die here. If there is a situation where this can happen, it will be considered a bug.
|
// Not ok for the owner to die here. If there is a situation where this can happen, it will be considered a bug.
|
||||||
CRASH_COND(die == true);
|
CRASH_COND(die);
|
||||||
|
|
||||||
owner = NULL;
|
owner = NULL;
|
||||||
|
|
||||||
|
@ -2203,7 +2203,7 @@ CSharpInstance::~CSharpInstance() {
|
||||||
// Unreference the owner here, before the new "instance binding" references it.
|
// Unreference the owner here, before the new "instance binding" references it.
|
||||||
// Otherwise, the unsafe reference debug checks will incorrectly detect a bug.
|
// Otherwise, the unsafe reference debug checks will incorrectly detect a bug.
|
||||||
bool die = _unreference_owner_unsafe();
|
bool die = _unreference_owner_unsafe();
|
||||||
CRASH_COND(die == true); // `owner_keep_alive` holds a reference, so it can't die
|
CRASH_COND(die); // `owner_keep_alive` holds a reference, so it can't die
|
||||||
|
|
||||||
void *data = owner->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
|
void *data = owner->get_script_instance_binding(CSharpLanguage::get_singleton()->get_language_index());
|
||||||
CRASH_COND(data == NULL);
|
CRASH_COND(data == NULL);
|
||||||
|
@ -3015,7 +3015,7 @@ CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_arg
|
||||||
|
|
||||||
bool die = instance->_unreference_owner_unsafe();
|
bool die = instance->_unreference_owner_unsafe();
|
||||||
// Not ok for the owner to die here. If there is a situation where this can happen, it will be considered a bug.
|
// Not ok for the owner to die here. If there is a situation where this can happen, it will be considered a bug.
|
||||||
CRASH_COND(die == true);
|
CRASH_COND(die);
|
||||||
|
|
||||||
p_owner->set_script_instance(NULL);
|
p_owner->set_script_instance(NULL);
|
||||||
r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
|
r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.InteropServices.ComTypes;
|
using System.Runtime.InteropServices.ComTypes;
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
/* https://godotengine.org */
|
/* https://godotengine.org */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||||
/* */
|
/* */
|
||||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||||
/* a copy of this software and associated documentation files (the */
|
/* a copy of this software and associated documentation files (the */
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
/* https://godotengine.org */
|
/* https://godotengine.org */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||||
/* */
|
/* */
|
||||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||||
/* a copy of this software and associated documentation files (the */
|
/* a copy of this software and associated documentation files (the */
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
/* https://godotengine.org */
|
/* https://godotengine.org */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
|
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||||
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
|
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||||
/* */
|
/* */
|
||||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||||
/* a copy of this software and associated documentation files (the */
|
/* a copy of this software and associated documentation files (the */
|
||||||
|
|
|
@ -3135,7 +3135,7 @@ void OS_OSX::run() {
|
||||||
process_events(); // get rid of pending events
|
process_events(); // get rid of pending events
|
||||||
joypad_osx->process_joypads();
|
joypad_osx->process_joypads();
|
||||||
|
|
||||||
if (Main::iteration() == true) {
|
if (Main::iteration()) {
|
||||||
quit = true;
|
quit = true;
|
||||||
}
|
}
|
||||||
} @catch (NSException *exception) {
|
} @catch (NSException *exception) {
|
||||||
|
|
Loading…
Reference in a new issue