1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Style: clang-format: Disable AllowShortIfStatementsOnASingleLine

This commit is contained in:
Rémi Verschelde
2021-05-04 14:28:27 +02:00
parent 6e600cb3f0
commit 3d15f04668
128 changed files with 872 additions and 455 deletions

View File

@@ -164,7 +164,8 @@ void AStar::connect_points(int p_id, int p_with_id, bool bidirectional) {
}
Segment s(p_id, p_with_id);
if (bidirectional) s.direction = Segment::BIDIRECTIONAL;
if (bidirectional)
s.direction = Segment::BIDIRECTIONAL;
Set<Segment>::Element *element = segments.find(s);
if (element != NULL) {
@@ -290,7 +291,8 @@ int AStar::get_closest_point(const Vector3 &p_point, bool p_include_disabled) co
for (OAHashMap<int, Point *>::Iterator it = points.iter(); it.valid; it = points.next_iter(it)) {
if (!p_include_disabled && !(*it.value)->enabled) continue; // Disabled points should not be considered.
if (!p_include_disabled && !(*it.value)->enabled)
continue; // Disabled points should not be considered.
// Keep the closest point's ID, and in case of multiple closest IDs,
// the smallest one (makes it deterministic).
@@ -344,7 +346,8 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
pass++;
if (!end_point->enabled) return false;
if (!end_point->enabled)
return false;
bool found_route = false;
@@ -455,7 +458,8 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
Point *end_point = b;
bool found_route = _solve(begin_point, end_point);
if (!found_route) return PoolVector<Vector3>();
if (!found_route)
return PoolVector<Vector3>();
Point *p = end_point;
int pc = 1; // Begin point
@@ -503,7 +507,8 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
Point *end_point = b;
bool found_route = _solve(begin_point, end_point);
if (!found_route) return PoolVector<int>();
if (!found_route)
return PoolVector<int>();
Point *p = end_point;
int pc = 1; // Begin point
@@ -733,7 +738,8 @@ PoolVector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
AStar::Point *end_point = b;
bool found_route = _solve(begin_point, end_point);
if (!found_route) return PoolVector<Vector2>();
if (!found_route)
return PoolVector<Vector2>();
AStar::Point *p = end_point;
int pc = 1; // Begin point
@@ -781,7 +787,8 @@ PoolVector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) {
AStar::Point *end_point = b;
bool found_route = _solve(begin_point, end_point);
if (!found_route) return PoolVector<int>();
if (!found_route)
return PoolVector<int>();
AStar::Point *p = end_point;
int pc = 1; // Begin point
@@ -813,7 +820,8 @@ bool AStar2D::_solve(AStar::Point *begin_point, AStar::Point *end_point) {
astar.pass++;
if (!end_point->enabled) return false;
if (!end_point->enabled)
return false;
bool found_route = false;