virtualx-engine/scene/2d
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
..
animated_sprite_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
animated_sprite_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
area_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
area_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
audio_stream_player_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
audio_stream_player_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
back_buffer_copy.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
back_buffer_copy.h Don't compile editor-only function when tools=no 2020-01-09 22:15:48 +01:00
camera_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
camera_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
canvas_modulate.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
canvas_modulate.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_object_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
collision_object_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_polygon_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
collision_polygon_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_shape_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
cpu_particles_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
cpu_particles_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
gpu_particles_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
gpu_particles_2d.h Rename more 2D and 3D nodes to follow convention 2020-03-27 16:26:34 +01:00
joints_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
joints_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
light_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
light_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
light_occluder_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
light_occluder_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
line_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
line_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
line_builder.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
line_builder.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
mesh_instance_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
mesh_instance_2d.h Texture refactor 2020-02-11 11:53:26 +01:00
multimesh_instance_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
multimesh_instance_2d.h Texture refactor 2020-02-11 11:53:26 +01:00
navigation_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_agent_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_agent_2d.h Port member initialization from constructor to declaration (C++11) 2020-05-14 10:01:56 +02:00
navigation_obstacle_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_obstacle_2d.h Port member initialization from constructor to declaration (C++11) 2020-05-14 10:01:56 +02:00
navigation_region_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
navigation_region_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
node_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
node_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
parallax_background.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
parallax_background.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
parallax_layer.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
parallax_layer.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
path_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
path_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
physics_body_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
physics_body_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
polygon_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
polygon_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
position_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
position_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
ray_cast_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
ray_cast_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
remote_transform_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
remote_transform_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
skeleton_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
skeleton_2d.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
sprite_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
sprite_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
tile_map.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
tile_map.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
touch_screen_button.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
touch_screen_button.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visibility_notifier_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
visibility_notifier_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
y_sort.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
y_sort.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00