mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
parent
03b13e0c69
commit
e956e80c1f
130 changed files with 967 additions and 511 deletions
|
@ -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 != nullptr) {
|
||||
|
@ -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.
|
||||
|
||||
real_t d = p_point.distance_squared_to((*it.value)->pos);
|
||||
if (closest_id < 0 || d < closest_dist) {
|
||||
|
@ -340,7 +342,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;
|
||||
|
||||
|
@ -451,7 +454,8 @@ Vector<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 Vector<Vector3>();
|
||||
if (!found_route)
|
||||
return Vector<Vector3>();
|
||||
|
||||
Point *p = end_point;
|
||||
int pc = 1; // Begin point
|
||||
|
@ -499,7 +503,8 @@ Vector<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 Vector<int>();
|
||||
if (!found_route)
|
||||
return Vector<int>();
|
||||
|
||||
Point *p = end_point;
|
||||
int pc = 1; // Begin point
|
||||
|
@ -729,7 +734,8 @@ Vector<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 Vector<Vector2>();
|
||||
if (!found_route)
|
||||
return Vector<Vector2>();
|
||||
|
||||
AStar::Point *p = end_point;
|
||||
int pc = 1; // Begin point
|
||||
|
@ -777,7 +783,8 @@ Vector<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 Vector<int>();
|
||||
if (!found_route)
|
||||
return Vector<int>();
|
||||
|
||||
AStar::Point *p = end_point;
|
||||
int pc = 1; // Begin point
|
||||
|
@ -809,7 +816,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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue