Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compilation time with include-what-you-use (scene folder) #57759

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions core/variant/typed_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#include "core/variant/array.h"
#include "core/variant/method_ptrcall.h"
#include "core/variant/type_info.h"
#include "core/variant/variant.h"

template <class T>
Expand Down
14 changes: 14 additions & 0 deletions scene/2d/animated_sprite_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@

#include "animated_sprite_2d.h"

#include "core/error/error_macros.h"
#include "core/math/color.h"
#include "core/math/transform_2d.h"
#include "core/object/callable_method_pointer.h"
#include "core/object/class_db.h"
#include "core/string/ustring.h"
#include "core/templates/list.h"
#include "core/templates/rid.h"
#include "core/templates/vector.h"
#include "core/typedefs.h"
#include "core/variant/variant.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/viewport.h"
#include "scene/resources/texture.h"
#include "scene/scene_string_names.h"

#ifdef TOOLS_ENABLED
Expand Down
9 changes: 9 additions & 0 deletions scene/2d/animated_sprite_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@
#ifndef ANIMATED_SPRITE_2D_H
#define ANIMATED_SPRITE_2D_H

#include "core/math/rect2.h"
#include "core/math/vector2.h"
#include "core/object/object.h"
#include "core/object/ref_counted.h"
#include "core/string/string_name.h"
#include "core/variant/dictionary.h"
#include "core/variant/typed_array.h"
#include "scene/2d/node_2d.h"
#include "scene/resources/sprite_frames.h"

class String;

class AnimatedSprite2D : public Node2D {
GDCLASS(AnimatedSprite2D, Node2D);

Expand Down
12 changes: 12 additions & 0 deletions scene/2d/area_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,20 @@

#include "area_2d.h"

#include "core/error/error_macros.h"
#include "core/object/callable_method_pointer.h"
#include "core/object/class_db.h"
#include "core/string/ustring.h"
#include "core/templates/pair.h"
#include "core/typedefs.h"
#include "core/variant/array.h"
#include "core/variant/callable.h"
#include "core/variant/variant.h"
#include "scene/2d/node_2d.h"
#include "scene/main/node.h"
#include "scene/scene_string_names.h"
#include "servers/audio_server.h"
#include "servers/physics_server_2d.h"

void Area2D::set_gravity_space_override_mode(SpaceOverride p_mode) {
gravity_space_override = p_mode;
Expand Down
12 changes: 12 additions & 0 deletions scene/2d/area_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,21 @@
#ifndef AREA_2D_H
#define AREA_2D_H

#include "core/math/math_defs.h"
#include "core/math/vector2.h"
#include "core/object/object.h"
#include "core/object/object_id.h"
#include "core/string/string_name.h"
#include "core/templates/map.h"
#include "core/templates/rid.h"
#include "core/templates/vset.h"
#include "core/variant/binder_common.h"
#include "core/variant/typed_array.h"
#include "scene/2d/collision_object_2d.h"

class Node2D;
class Node;

class Area2D : public CollisionObject2D {
GDCLASS(Area2D, CollisionObject2D);

Expand Down
5 changes: 5 additions & 0 deletions scene/2d/audio_listener_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@

#include "audio_listener_2d.h"

#include "core/object/class_db.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "scene/main/viewport.h"

bool AudioListener2D::_set(const StringName &p_name, const Variant &p_value) {
if (p_name == "current") {
if (p_value.operator bool()) {
Expand Down
4 changes: 4 additions & 0 deletions scene/2d/audio_listener_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#ifndef LISTENER_2D_H
#define LISTENER_2D_H

#include "core/object/object.h"
#include "core/string/string_name.h"
#include "core/templates/list.h"
#include "core/variant/variant.h"
#include "scene/2d/node_2d.h"
#include "scene/main/window.h"

Expand Down
19 changes: 18 additions & 1 deletion scene/2d/audio_stream_player_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,26 @@

#include "audio_stream_player_2d.h"

#include "core/config/engine.h"
#include "core/error/error_macros.h"
#include "core/math/math_funcs.h"
#include "core/math/rect2.h"
#include "core/math/transform_2d.h"
#include "core/math/vector2.h"
#include "core/object/callable_method_pointer.h"
#include "core/object/class_db.h"
#include "core/string/ustring.h"
#include "core/templates/set.h"
#include "core/typedefs.h"
#include "core/variant/variant.h"
#include "scene/2d/area_2d.h"
#include "scene/2d/audio_listener_2d.h"
#include "scene/main/window.h"
#include "scene/main/node.h"
#include "scene/main/viewport.h"
#include "scene/resources/world_2d.h"
#include "servers/audio/audio_stream.h"
#include "servers/audio_server.h"
#include "servers/physics_server_2d.h"

void AudioStreamPlayer2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
Expand Down
12 changes: 12 additions & 0 deletions scene/2d/audio_stream_player_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,22 @@
#ifndef AUDIO_STREAM_PLAYER_2D_H
#define AUDIO_STREAM_PLAYER_2D_H

#include <stdint.h>

#include "core/math/audio_frame.h"
#include "core/object/object.h"
#include "core/object/ref_counted.h"
#include "core/string/string_name.h"
#include "core/templates/safe_refcount.h"
#include "core/templates/vector.h"
#include "scene/2d/node_2d.h"
#include "servers/audio/audio_stream.h"
#include "servers/audio_server.h"

class AudioStream;
class AudioStreamPlayback;
class Viewport;

class AudioStreamPlayer2D : public Node2D {
GDCLASS(AudioStreamPlayer2D, Node2D);

Expand Down
4 changes: 4 additions & 0 deletions scene/2d/back_buffer_copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

#include "back_buffer_copy.h"

#include "core/object/class_db.h"
#include "core/variant/variant.h"
#include "servers/rendering_server.h"

void BackBufferCopy::_update_copy_mode() {
switch (copy_mode) {
case COPY_MODE_DISABLED: {
Expand Down
3 changes: 3 additions & 0 deletions scene/2d/back_buffer_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#ifndef BACKBUFFERCOPY_H
#define BACKBUFFERCOPY_H

#include "core/math/rect2.h"
#include "core/object/object.h"
#include "core/variant/binder_common.h"
#include "scene/2d/node_2d.h"

class BackBufferCopy : public Node2D {
Expand Down
14 changes: 14 additions & 0 deletions scene/2d/camera_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@

#include "camera_2d.h"

#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/error/error_macros.h"
#include "core/math/color.h"
#include "core/math/math_funcs.h"
#include "core/math/rect2.h"
#include "core/object/class_db.h"
#include "core/string/ustring.h"
#include "core/typedefs.h"
#include "core/variant/variant.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "scene/main/viewport.h"
#include "scene/main/window.h"

void Camera2D::_update_scroll() {
Expand Down
11 changes: 11 additions & 0 deletions scene/2d/camera_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@
#ifndef CAMERA_2D_H
#define CAMERA_2D_H

#include "core/math/math_defs.h"
#include "core/math/transform_2d.h"
#include "core/math/vector2.h"
#include "core/object/object.h"
#include "core/object/object_id.h"
#include "core/string/string_name.h"
#include "core/templates/rid.h"
#include "core/variant/binder_common.h"
#include "scene/2d/node_2d.h"

class Node;
class Viewport;

class Camera2D : public Node2D {
GDCLASS(Camera2D, Node2D);

Expand Down
5 changes: 5 additions & 0 deletions scene/2d/canvas_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@

#include "canvas_group.h"

#include "core/error/error_macros.h"
#include "core/object/class_db.h"
#include "core/variant/variant.h"
#include "servers/rendering_server.h"

void CanvasGroup::set_fit_margin(real_t p_fit_margin) {
ERR_FAIL_COND(p_fit_margin < 0.0);

Expand Down
2 changes: 2 additions & 0 deletions scene/2d/canvas_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#ifndef CANVASGROUP_H
#define CANVASGROUP_H

#include "core/math/math_defs.h"
#include "core/object/object.h"
#include "scene/2d/node_2d.h"

class CanvasGroup : public Node2D {
Expand Down
10 changes: 10 additions & 0 deletions scene/2d/canvas_modulate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@

#include "canvas_modulate.h"

#include "core/object/class_db.h"
#include "core/string/ustring.h"
#include "core/templates/list.h"
#include "core/templates/rid.h"
#include "core/variant/variant.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "servers/rendering_server.h"

void CanvasModulate::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_CANVAS) {
if (is_visible_in_tree()) {
Expand Down
5 changes: 5 additions & 0 deletions scene/2d/canvas_modulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@
#ifndef CANVASMODULATE_H
#define CANVASMODULATE_H

#include "core/math/color.h"
#include "core/object/object.h"
#include "core/variant/typed_array.h"
#include "scene/2d/node_2d.h"

class String;

class CanvasModulate : public Node2D {
GDCLASS(CanvasModulate, Node2D);

Expand Down
11 changes: 11 additions & 0 deletions scene/2d/collision_object_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@

#include "collision_object_2d.h"

#include "core/error/error_macros.h"
#include "core/input/input_event.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "core/string/ustring.h"
#include "core/templates/pair.h"
#include "core/variant/variant.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/viewport.h"
#include "scene/resources/world_2d.h"
#include "scene/scene_string_names.h"

void CollisionObject2D::_notification(int p_what) {
Expand Down
21 changes: 21 additions & 0 deletions scene/2d/collision_object_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,32 @@
#ifndef COLLISION_OBJECT_2D_H
#define COLLISION_OBJECT_2D_H

#include <stdint.h>

#include "core/math/math_defs.h"
#include "core/math/transform_2d.h"
#include "core/object/gdvirtual.gen.inc"
#include "core/object/object.h"
#include "core/object/object_id.h"
#include "core/object/ref_counted.h"
#include "core/string/string_name.h"
#include "core/templates/list.h"
#include "core/templates/map.h"
#include "core/templates/rid.h"
#include "core/templates/vector.h"
#include "core/typedefs.h"
#include "core/variant/array.h"
#include "core/variant/binder_common.h"
#include "core/variant/typed_array.h"
#include "scene/2d/node_2d.h"
#include "scene/main/viewport.h"
#include "scene/resources/shape_2d.h"
#include "servers/physics_server_2d.h"

class InputEvent;
class String;
class Viewport;

class CollisionObject2D : public Node2D {
GDCLASS(CollisionObject2D, Node2D);

Expand Down
17 changes: 15 additions & 2 deletions scene/2d/collision_polygon_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,25 @@

#include "collision_polygon_2d.h"

#include <initializer_list>

#include "collision_object_2d.h"
#include "core/config/engine.h"
#include "core/error/error_macros.h"
#include "core/math/color.h"
#include "core/math/geometry_2d.h"
#include "core/math/math_funcs.h"
#include "core/object/class_db.h"
#include "core/object/ref_counted.h"
#include "core/os/memory.h"
#include "core/string/ustring.h"
#include "core/variant/variant.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"

#include "thirdparty/misc/polypartition.h"
#include "scene/resources/shape_2d.h"

void CollisionPolygon2D::_build_polygon() {
parent->shape_owner_clear_shapes(owner_id);
Expand Down
10 changes: 10 additions & 0 deletions scene/2d/collision_polygon_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@
#ifndef COLLISION_POLYGON_2D_H
#define COLLISION_POLYGON_2D_H

#include <stdint.h>

#include "core/math/math_defs.h"
#include "core/math/rect2.h"
#include "core/math/vector2.h"
#include "core/object/object.h"
#include "core/templates/vector.h"
#include "core/variant/binder_common.h"
#include "core/variant/typed_array.h"
#include "scene/2d/node_2d.h"

class CollisionObject2D;
class String;

class CollisionPolygon2D : public Node2D {
GDCLASS(CollisionPolygon2D, Node2D);
Expand Down
13 changes: 13 additions & 0 deletions scene/2d/collision_shape_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,20 @@

#include "collision_shape_2d.h"

#include <initializer_list>

#include "collision_object_2d.h"
#include "core/config/engine.h"
#include "core/error/error_macros.h"
#include "core/math/color.h"
#include "core/object/callable_method_pointer.h"
#include "core/object/class_db.h"
#include "core/string/ustring.h"
#include "core/templates/vector.h"
#include "core/variant/variant.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"

Expand Down
Loading