Remove empty constructors and destructors from scene/

This commit is contained in:
kobewi
2025-05-06 14:46:54 +02:00
parent 1a1cc0f7b0
commit 34b485d62b
65 changed files with 0 additions and 191 deletions

View File

@ -115,6 +115,4 @@ public:
Transform2D get_relative_transform_to_parent(const Node *p_parent) const;
Transform2D get_transform() const override;
Node2D() {}
};

View File

@ -55,8 +55,6 @@ public:
void set_curve(const Ref<Curve2D> &p_curve);
Ref<Curve2D> get_curve() const;
Path2D() {}
};
class PathFollow2D : public Node2D {
@ -106,6 +104,4 @@ public:
bool is_cubic_interpolation_enabled() const;
PackedStringArray get_configuration_warnings() const override;
PathFollow2D() {}
};

View File

@ -136,8 +136,6 @@ public:
void update_transform();
static Transform3D correct_posture(Transform3D p_transform, PathFollow3D::RotationMode p_rotation_mode);
PathFollow3D() {}
};
VARIANT_ENUM_CAST(PathFollow3D::RotationMode);

View File

@ -156,8 +156,6 @@ public:
virtual void _get_property_list(List<PropertyInfo> *p_list) const;
SixDOFAxisData axis_data[3];
SixDOFJointData() {}
};
private:

View File

@ -61,8 +61,6 @@ public:
void set_margin(real_t p_margin);
real_t get_margin();
SpringArm3D() {}
private:
void process_spring();
};

View File

@ -90,8 +90,6 @@ public:
Vector<EndEffector> end_effectors;
Transform3D goal_global_transform;
Task() {}
};
private:

View File

@ -153,9 +153,6 @@ public:
Vector2 get_vector2(const StringName &p_name) const;
XRPositionalTracker::TrackerHand get_tracker_hand() const;
XRController3D() {}
~XRController3D() {}
};
/*
@ -175,9 +172,6 @@ protected:
public:
Vector3 get_size() const;
Plane get_plane() const;
XRAnchor3D() {}
~XRAnchor3D() {}
};
/*
@ -211,7 +205,4 @@ public:
void set_current(bool p_enabled);
bool is_current() const;
XROrigin3D() {}
~XROrigin3D() {}
};

View File

@ -198,7 +198,6 @@ protected:
TrackCacheTransform() {
type = Animation::TYPE_POSITION_3D;
}
~TrackCacheTransform() {}
};
struct RootMotionCache {
@ -219,7 +218,6 @@ protected:
shape_index(p_other.shape_index) {}
TrackCacheBlendShape() { type = Animation::TYPE_BLEND_SHAPE; }
~TrackCacheBlendShape() {}
};
struct TrackCacheValue : public TrackCache {
@ -258,7 +256,6 @@ protected:
struct TrackCacheMethod : public TrackCache {
TrackCacheMethod() { type = Animation::TYPE_METHOD; }
~TrackCacheMethod() {}
};
// Audio stream information for each audio stream placed on the track.
@ -296,7 +293,6 @@ protected:
TrackCacheAudio() {
type = Animation::TYPE_AUDIO;
}
~TrackCacheAudio() {}
};
struct TrackCacheAnimation : public TrackCache {
@ -305,7 +301,6 @@ protected:
TrackCacheAnimation() {
type = Animation::TYPE_ANIMATION;
}
~TrackCacheAnimation() {}
};
RootMotionCache root_motion_cache;
@ -390,7 +385,6 @@ protected:
step = 0.0;
}
CaptureCache() {}
~CaptureCache() {
clear();
}

View File

@ -251,9 +251,6 @@ protected:
virtual void _tree_changed();
virtual void _animation_node_renamed(const ObjectID &p_oid, const String &p_old_name, const String &p_new_name);
virtual void _animation_node_removed(const ObjectID &p_oid, const StringName &p_node);
public:
AnimationRootNode() {}
};
class AnimationNodeStartState : public AnimationRootNode {

View File

@ -93,5 +93,3 @@ void CenterContainer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_top_left"), "set_use_top_left", "is_using_top_left");
}
CenterContainer::CenterContainer() {}

View File

@ -49,6 +49,4 @@ public:
virtual Vector<int> get_allowed_size_flags_horizontal() const override;
virtual Vector<int> get_allowed_size_flags_vertical() const override;
CenterContainer();
};

View File

@ -89,6 +89,4 @@ public:
bool is_resizing() const {
return resizing;
}
GraphElement() {}
};

View File

@ -318,5 +318,3 @@ Size2 GridContainer::get_minimum_size() const {
return ms;
}
GridContainer::GridContainer() {}

View File

@ -52,6 +52,4 @@ public:
virtual Size2 get_minimum_size() const override;
int get_h_separation() const;
GridContainer();
};

View File

@ -40,13 +40,8 @@ class SpinBoxLineEdit : public LineEdit {
protected:
void _notification(int p_what);
static void _bind_methods() {}
void _accessibility_action_inc(const Variant &p_data);
void _accessibility_action_dec(const Variant &p_data);
public:
SpinBoxLineEdit() {}
};
class SpinBox : public Range {

View File

@ -418,5 +418,3 @@ void TextureButton::set_flip_v(bool p_flip) {
bool TextureButton::is_flipped_v() const {
return vflip;
}
TextureButton::TextureButton() {}

View File

@ -98,8 +98,6 @@ public:
void set_flip_v(bool p_flip);
bool is_flipped_v() const;
TextureButton();
};
VARIANT_ENUM_CAST(TextureButton::StretchMode);

View File

@ -579,8 +579,6 @@ void VideoStreamPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
}
VideoStreamPlayer::VideoStreamPlayer() {}
VideoStreamPlayer::~VideoStreamPlayer() {
resampler.clear(); // Not necessary here, but make in consistent with other "stream_player" classes.
}

View File

@ -124,6 +124,5 @@ public:
void set_bus(const StringName &p_bus);
StringName get_bus() const;
VideoStreamPlayer();
~VideoStreamPlayer();
};

View File

@ -74,7 +74,6 @@ public:
bool has_multiplayer_peer() { return get_multiplayer_peer().is_valid(); }
bool is_server() { return get_unique_id() == MultiplayerPeer::TARGET_PEER_SERVER; }
MultiplayerAPI() {}
virtual ~MultiplayerAPI() {}
};

View File

@ -92,8 +92,6 @@ public:
virtual ConnectionStatus get_connection_status() const = 0;
uint32_t generate_unique_id() const;
MultiplayerPeer() {}
};
VARIANT_ENUM_CAST(MultiplayerPeer::ConnectionStatus);

View File

@ -114,8 +114,6 @@ void SceneTreeTimer::release_connections() {
}
}
SceneTreeTimer::SceneTreeTimer() {}
#ifndef _3D_DISABLED
// This should be called once per physics tick, to make sure the transform previous and current
// is kept up to date on the few Node3Ds that are using client side physics interpolation.

View File

@ -77,8 +77,6 @@ public:
bool is_ignoring_time_scale();
void release_connections();
SceneTreeTimer();
};
class SceneTree : public MainLoop {

View File

@ -288,5 +288,3 @@ PackedStringArray ShaderGlobalsOverride::get_configuration_warnings() const {
void ShaderGlobalsOverride::_bind_methods() {
ClassDB::bind_method(D_METHOD("_activate"), &ShaderGlobalsOverride::_activate);
}
ShaderGlobalsOverride::ShaderGlobalsOverride() {}

View File

@ -58,6 +58,4 @@ protected:
public:
PackedStringArray get_configuration_warnings() const override;
ShaderGlobalsOverride();
};

View File

@ -245,5 +245,3 @@ void Timer::_bind_methods() {
BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
}
Timer::Timer() {}

View File

@ -80,7 +80,6 @@ public:
void set_timer_process_callback(TimerProcessCallback p_callback);
TimerProcessCallback get_timer_process_callback() const;
Timer();
private:
TimerProcessCallback timer_process_callback = TIMER_PROCESS_IDLE;

View File

@ -5564,5 +5564,3 @@ void SubViewport::_validate_property(PropertyInfo &p_property) const {
SubViewport::SubViewport() {
RS::get_singleton()->viewport_set_size(get_viewport_rid(), get_size().width, get_size().height);
}
SubViewport::~SubViewport() {}

View File

@ -909,7 +909,6 @@ public:
void _validate_property(PropertyInfo &p_property) const;
SubViewport();
~SubViewport();
};
VARIANT_ENUM_CAST(Viewport::Scaling3DMode);
VARIANT_ENUM_CAST(SubViewport::UpdateMode);

View File

@ -108,6 +108,5 @@ public:
Rect2 get_bounds();
NavigationMeshSourceGeometryData2D() {}
~NavigationMeshSourceGeometryData2D() { clear(); }
};

View File

@ -167,9 +167,6 @@ public:
void set_data(const Vector<Vector2> &p_vertices, const Vector<Vector<int>> &p_polygons, const Vector<Vector<Vector2>> &p_outlines);
void get_data(Vector<Vector2> &r_vertices, Vector<Vector<int>> &r_polygons);
void get_data(Vector<Vector2> &r_vertices, Vector<Vector<int>> &r_polygons, Vector<Vector<Vector2>> &r_outlines);
NavigationPolygon() {}
~NavigationPolygon() {}
};
VARIANT_ENUM_CAST(NavigationPolygon::SamplePartitionType);

View File

@ -105,6 +105,5 @@ public:
AABB get_bounds();
NavigationMeshSourceGeometryData3D() {}
~NavigationMeshSourceGeometryData3D() { clear(); }
};

View File

@ -689,8 +689,6 @@ int CapsuleMesh::get_rings() const {
return rings;
}
CapsuleMesh::CapsuleMesh() {}
/**
BoxMesh
*/
@ -1036,8 +1034,6 @@ int BoxMesh::get_subdivide_depth() const {
return subdivide_d;
}
BoxMesh::BoxMesh() {}
/**
CylinderMesh
*/
@ -1395,8 +1391,6 @@ bool CylinderMesh::is_cap_bottom() const {
return cap_bottom;
}
CylinderMesh::CylinderMesh() {}
/**
PlaneMesh
*/
@ -1589,8 +1583,6 @@ PlaneMesh::Orientation PlaneMesh::get_orientation() const {
return orientation;
}
PlaneMesh::PlaneMesh() {}
/**
PrismMesh
*/
@ -1961,8 +1953,6 @@ int PrismMesh::get_subdivide_depth() const {
return subdivide_d;
}
PrismMesh::PrismMesh() {}
/**
SphereMesh
*/
@ -2181,8 +2171,6 @@ bool SphereMesh::get_is_hemisphere() const {
return is_hemisphere;
}
SphereMesh::SphereMesh() {}
/**
TorusMesh
*/
@ -2378,8 +2366,6 @@ int TorusMesh::get_ring_segments() const {
return ring_segments;
}
TorusMesh::TorusMesh() {}
/**
PointMesh
*/

View File

@ -152,8 +152,6 @@ public:
void set_rings(const int p_rings);
int get_rings() const;
CapsuleMesh();
};
/**
@ -188,8 +186,6 @@ public:
void set_subdivide_depth(const int p_divisions);
int get_subdivide_depth() const;
BoxMesh();
};
/**
@ -237,8 +233,6 @@ public:
void set_cap_bottom(bool p_cap_bottom);
bool is_cap_bottom() const;
CylinderMesh();
};
/*
@ -282,8 +276,6 @@ public:
void set_orientation(const Orientation p_orientation);
Orientation get_orientation() const;
PlaneMesh();
};
VARIANT_ENUM_CAST(PlaneMesh::Orientation)
@ -335,8 +327,6 @@ public:
void set_subdivide_depth(const int p_divisions);
int get_subdivide_depth() const;
PrismMesh();
};
/**
@ -375,8 +365,6 @@ public:
void set_is_hemisphere(const bool p_is_hemisphere);
bool get_is_hemisphere() const;
SphereMesh();
};
/**
@ -409,8 +397,6 @@ public:
void set_ring_segments(const int p_ring_segments);
int get_ring_segments() const;
TorusMesh();
};
/**

View File

@ -112,7 +112,6 @@ public:
TypeHash thash = 0; // Hash by Path + SubPath + TrackType.
bool imported = false;
bool enabled = true;
Track() {}
virtual ~Track() {}
};

View File

@ -253,5 +253,3 @@ Ref<Image> AtlasTexture::get_image() const {
return atlas_image->get_region(_get_region_rect());
}
AtlasTexture::AtlasTexture() {}

View File

@ -73,6 +73,4 @@ public:
bool is_pixel_opaque(int p_x, int p_y) const override;
virtual Ref<Image> get_image() const override;
AtlasTexture();
};

View File

@ -426,10 +426,6 @@ void AudioStreamPlaybackWAV::set_sample_playback(const Ref<AudioSamplePlayback>
}
}
AudioStreamPlaybackWAV::AudioStreamPlaybackWAV() {}
AudioStreamPlaybackWAV::~AudioStreamPlaybackWAV() {}
/////////////////////
void AudioStreamWAV::set_format(Format p_format) {
@ -1156,7 +1152,3 @@ void AudioStreamWAV::_bind_methods() {
BIND_ENUM_CONSTANT(LOOP_PINGPONG);
BIND_ENUM_CONSTANT(LOOP_BACKWARD);
}
AudioStreamWAV::AudioStreamWAV() {}
AudioStreamWAV::~AudioStreamWAV() {}

View File

@ -90,9 +90,6 @@ public:
virtual bool get_is_sample() const override;
virtual Ref<AudioSamplePlayback> get_sample_playback() const override;
virtual void set_sample_playback(const Ref<AudioSamplePlayback> &p_playback) override;
AudioStreamPlaybackWAV();
~AudioStreamPlaybackWAV();
};
class AudioStreamWAV : public AudioStream {
@ -287,9 +284,6 @@ public:
dst_ptr += qoa_encode_frame(data16.ptr(), p_desc, frame_len, dst_ptr);
}
}
AudioStreamWAV();
~AudioStreamWAV();
};
VARIANT_ENUM_CAST(AudioStreamWAV::Format)

View File

@ -727,5 +727,3 @@ void BitMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
}
BitMap::BitMap() {}

View File

@ -76,6 +76,4 @@ public:
Ref<Image> convert_to_image() const;
Vector<Vector<Vector2>> clip_opaque_to_polygons(const Rect2i &p_rect, float p_epsilon = 2.0) const;
BitMap();
};

View File

@ -457,8 +457,6 @@ void CompressedTexture2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "load_path", PROPERTY_HINT_FILE, "*.ctex"), "load", "get_load_path");
}
CompressedTexture2D::CompressedTexture2D() {}
CompressedTexture2D::~CompressedTexture2D() {
if (texture.is_valid()) {
ERR_FAIL_NULL(RenderingServer::get_singleton());
@ -646,8 +644,6 @@ void CompressedTexture3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "load_path", PROPERTY_HINT_FILE, "*.ctex"), "load", "get_load_path");
}
CompressedTexture3D::CompressedTexture3D() {}
CompressedTexture3D::~CompressedTexture3D() {
if (texture.is_valid()) {
ERR_FAIL_NULL(RenderingServer::get_singleton());

View File

@ -107,7 +107,6 @@ public:
virtual Ref<Image> get_image() const override;
CompressedTexture2D();
~CompressedTexture2D();
};
@ -258,7 +257,6 @@ public:
virtual Vector<Ref<Image>> get_data() const override;
CompressedTexture3D();
~CompressedTexture3D();
};

View File

@ -1434,8 +1434,6 @@ void Curve2D::_bind_methods() {
ADD_ARRAY_COUNT("Points", "point_count", "set_point_count", "get_point_count", "point_");
}
Curve2D::Curve2D() {}
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
@ -2514,5 +2512,3 @@ void Curve3D::_bind_methods() {
ADD_GROUP("Up Vector", "up_vector_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "up_vector_enabled"), "set_up_vector_enabled", "is_up_vector_enabled");
}
Curve3D::Curve3D() {}

View File

@ -251,8 +251,6 @@ public:
PackedVector2Array tessellate(int p_max_stages = 5, real_t p_tolerance = 4) const; //useful for display
PackedVector2Array tessellate_even_length(int p_max_stages = 5, real_t p_length = 20.0) const; // Useful for baking.
Curve2D();
};
class Curve3D : public Resource {
@ -360,6 +358,4 @@ public:
PackedVector3Array tessellate(int p_max_stages = 5, real_t p_tolerance = 4) const; // Useful for display.
PackedVector3Array tessellate_even_length(int p_max_stages = 5, real_t p_length = 0.2) const; // Useful for baking.
Curve3D();
};

View File

@ -163,8 +163,6 @@ RID CurveTexture::get_rid() const {
return _texture;
}
CurveTexture::CurveTexture() {}
CurveTexture::~CurveTexture() {
if (_texture.is_valid()) {
ERR_FAIL_NULL(RenderingServer::get_singleton());
@ -360,8 +358,6 @@ RID CurveXYZTexture::get_rid() const {
return _texture;
}
CurveXYZTexture::CurveXYZTexture() {}
CurveXYZTexture::~CurveXYZTexture() {
if (_texture.is_valid()) {
ERR_FAIL_NULL(RenderingServer::get_singleton());

View File

@ -71,7 +71,6 @@ public:
virtual int get_height() const override { return 1; }
virtual bool has_alpha() const override { return false; }
CurveTexture();
~CurveTexture();
};
@ -114,6 +113,5 @@ public:
virtual int get_height() const override { return 1; }
virtual bool has_alpha() const override { return false; }
CurveXYZTexture();
~CurveXYZTexture();
};

View File

@ -234,8 +234,6 @@ void ImageTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_size_override", "size"), &ImageTexture::set_size_override);
}
ImageTexture::ImageTexture() {}
ImageTexture::~ImageTexture() {
if (texture.is_valid()) {
ERR_FAIL_NULL(RenderingServer::get_singleton());

View File

@ -81,7 +81,6 @@ public:
virtual void set_path(const String &p_path, bool p_take_over = false) override;
ImageTexture();
~ImageTexture();
};

View File

@ -202,9 +202,6 @@ public:
#ifdef DEBUG_ENABLED
Ref<ArrayMesh> get_debug_mesh();
#endif // DEBUG_ENABLED
NavigationMesh() {}
~NavigationMesh() {}
};
VARIANT_ENUM_CAST(NavigationMesh::SamplePartitionType);

View File

@ -66,7 +66,5 @@ public:
_FORCE_INLINE_ real_t computed_bounce() const {
return absorbent ? -bounce : bounce;
}
PhysicsMaterial() {}
};
#endif // !defined(PHYSICS_2D_DISABLED) || !defined(PHYSICS_3D_DISABLED)

View File

@ -397,8 +397,6 @@ void PortableCompressedTexture2D::_bind_methods() {
BIND_ENUM_CONSTANT(COMPRESSION_MODE_ASTC);
}
PortableCompressedTexture2D::PortableCompressedTexture2D() {}
PortableCompressedTexture2D::~PortableCompressedTexture2D() {
if (texture.is_valid()) {
ERR_FAIL_NULL(RenderingServer::get_singleton());

View File

@ -113,7 +113,6 @@ public:
static void set_keep_all_compressed_buffers(bool p_keep);
static bool is_keeping_all_compressed_buffers();
PortableCompressedTexture2D();
~PortableCompressedTexture2D();
};

View File

@ -78,5 +78,4 @@ class StyleBoxEmpty : public StyleBox {
public:
virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override {}
StyleBoxEmpty() {}
};

View File

@ -731,7 +731,3 @@ void StyleBoxFlat::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "anti_aliasing"), "set_anti_aliased", "is_anti_aliased");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "anti_aliasing_size", PROPERTY_HINT_RANGE, "0.01,10,0.001,suffix:px"), "set_aa_size", "get_aa_size");
}
StyleBoxFlat::StyleBoxFlat() {}
StyleBoxFlat::~StyleBoxFlat() {}

View File

@ -109,7 +109,4 @@ public:
virtual Rect2 get_draw_rect(const Rect2 &p_rect) const override;
virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override;
StyleBoxFlat();
~StyleBoxFlat();
};

View File

@ -126,7 +126,3 @@ void StyleBoxLine::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "thickness", PROPERTY_HINT_RANGE, "0,100,suffix:px"), "set_thickness", "get_thickness");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vertical"), "set_vertical", "is_vertical");
}
StyleBoxLine::StyleBoxLine() {}
StyleBoxLine::~StyleBoxLine() {}

View File

@ -61,7 +61,4 @@ public:
float get_grow_end() const;
virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override;
StyleBoxLine();
~StyleBoxLine();
};

View File

@ -237,7 +237,3 @@ void StyleBoxTexture::_bind_methods() {
BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE);
BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);
}
StyleBoxTexture::StyleBoxTexture() {}
StyleBoxTexture::~StyleBoxTexture() {}

View File

@ -88,9 +88,6 @@ public:
virtual Rect2 get_draw_rect(const Rect2 &p_rect) const override;
virtual void draw(RID p_canvas_item, const Rect2 &p_rect) const override;
StyleBoxTexture();
~StyleBoxTexture();
};
VARIANT_ENUM_CAST(StyleBoxTexture::AxisStretchMode)

View File

@ -61,8 +61,6 @@ public:
Vector<float> weights;
bool operator==(const Vertex &p_vertex) const;
Vertex() {}
};
enum CustomFormat {

View File

@ -64,7 +64,6 @@ public:
void set_text_edit(TextEdit *p_text_edit);
TextEdit *get_text_edit() const;
SyntaxHighlighter() {}
virtual ~SyntaxHighlighter() {}
};

View File

@ -39,9 +39,6 @@
class Texture : public Resource {
GDCLASS(Texture, Resource);
public:
Texture() {}
};
class Texture2D : public Texture {
@ -108,8 +105,6 @@ public:
virtual int get_layers() const;
virtual bool has_mipmaps() const;
virtual Ref<Image> get_layer_data(int p_layer) const;
TextureLayered() {}
};
VARIANT_ENUM_CAST(TextureLayered::LayeredType)

View File

@ -795,8 +795,6 @@ public:
void set_description(const String &p_description);
String get_description() const;
VisualShaderNodeComment() {}
};
#endif

View File

@ -78,5 +78,4 @@ public:
int get_theme_default_font_size();
ThemeOwner(Node *p_holder) { holder = p_holder; }
~ThemeOwner() {}
};