diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index b6cc5bf42a..3da494a8ef 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -151,11 +151,6 @@ void PacketPeer::_bind_methods() { /***************/ -void PacketPeerStream::_set_stream_peer(REF p_peer) { - ERR_FAIL_COND_MSG(p_peer.is_null(), "It's not a reference to a valid Resource object."); - set_stream_peer(p_peer); -} - void PacketPeerStream::_bind_methods() { ClassDB::bind_method(D_METHOD("set_stream_peer", "peer"), &PacketPeerStream::set_stream_peer); ClassDB::bind_method(D_METHOD("get_stream_peer"), &PacketPeerStream::get_stream_peer); @@ -263,10 +258,8 @@ int PacketPeerStream::get_max_packet_size() const { } void PacketPeerStream::set_stream_peer(const Ref &p_peer) { - //ERR_FAIL_COND(p_peer.is_null()); - if (p_peer.ptr() != peer.ptr()) { - ring_buffer.advance_read(ring_buffer.data_left()); // reset the ring buffer + ring_buffer.advance_read(ring_buffer.data_left()); // Reset the ring buffer. } peer = p_peer; diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index f7f080aa43..a25fa03875 100644 --- a/core/io/packet_peer.h +++ b/core/io/packet_peer.h @@ -86,7 +86,6 @@ class PacketPeerStream : public PacketPeer { Error _poll_buffer() const; protected: - void _set_stream_peer(REF p_peer); static void _bind_methods(); public: diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index c88331cf9e..9b14d2c763 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -192,10 +192,6 @@ bool ResourceFormatImporter::recognize_path(const String &p_path, const String & return FileAccess::exists(p_path + ".import"); } -bool ResourceFormatImporter::can_be_imported(const String &p_path) const { - return ResourceFormatLoader::recognize_path(p_path); -} - int ResourceFormatImporter::get_import_order(const String &p_path) const { Ref importer; diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 30bbd43c18..1b300bf656 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -70,7 +70,6 @@ public: virtual String get_import_group_file(const String &p_path) const; virtual bool exists(const String &p_path) const; - virtual bool can_be_imported(const String &p_path) const; virtual int get_import_order(const String &p_path) const; String get_internal_resource_path(const String &p_path) const; diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index 23f5bb88fe..09354d8e79 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -72,39 +72,6 @@ Vector3 Vector3::snapped(Vector3 p_val) const { return v; } -Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const { - Vector3 p0 = p_pre_a; - Vector3 p1 = *this; - Vector3 p2 = p_b; - Vector3 p3 = p_post_b; - - { - //normalize - - real_t ab = p0.distance_to(p1); - real_t bc = p1.distance_to(p2); - real_t cd = p2.distance_to(p3); - - if (ab > 0) { - p0 = p1 + (p0 - p1) * (bc / ab); - } - if (cd > 0) { - p3 = p2 + (p3 - p2) * (bc / cd); - } - } - - real_t t = p_weight; - real_t t2 = t * t; - real_t t3 = t2 * t; - - Vector3 out; - out = 0.5 * ((p1 * 2.0) + - (-p0 + p2) * t + - (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3) * t2 + - (-p0 + 3.0 * p1 - 3.0 * p2 + p3) * t3); - return out; -} - Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const { Vector3 p0 = p_pre_a; Vector3 p1 = *this; diff --git a/core/math/vector3.h b/core/math/vector3.h index 69e79627f3..5af84377fd 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -89,7 +89,6 @@ struct Vector3 { _FORCE_INLINE_ Vector3 lerp(const Vector3 &p_to, real_t p_weight) const; _FORCE_INLINE_ Vector3 slerp(const Vector3 &p_to, real_t p_weight) const; Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const; - Vector3 cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const; Vector3 move_toward(const Vector3 &p_to, const real_t p_delta) const; _FORCE_INLINE_ Vector3 cross(const Vector3 &p_b) const; diff --git a/core/object/object.cpp b/core/object/object.cpp index 3764316122..681e1188ff 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -823,10 +823,6 @@ void Object::property_list_changed_notify() { _change_notify(); } -void Object::cancel_delete() { - _predelete_ok = true; -} - void Object::set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance) { //this function is not meant to be used in any of these ways ERR_FAIL_COND(p_script.is_null()); diff --git a/core/object/object.h b/core/object/object.h index 5bf9600c5a..dc004f38a9 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -525,8 +525,6 @@ protected: static void get_valid_parents_static(List *p_parents); static void _get_valid_parents_static(List *p_parents); - void cancel_delete(); - virtual void _changed_callback(Object *p_changed, const char *p_prop); //Variant _call_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant()); diff --git a/core/object/script_language.h b/core/object/script_language.h index ddd884a4f3..f5d65cf42d 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -274,8 +274,6 @@ class ScriptCodeCompletionCache { static ScriptCodeCompletionCache *singleton; public: - virtual RES get_cached_resource(const String &p_path) = 0; - static ScriptCodeCompletionCache *get_singleton() { return singleton; } ScriptCodeCompletionCache(); diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 717e4628ae..7411af2280 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2217,10 +2217,6 @@ void AnimationTrackEdit::draw_bg(int p_clip_left, int p_clip_right) { void AnimationTrackEdit::draw_fg(int p_clip_left, int p_clip_right) { } -void AnimationTrackEdit::draw_texture_clipped(const Ref &p_texture, const Vector2 &p_pos) { - draw_texture_region_clipped(p_texture, Rect2(p_pos, p_texture->get_size()), Rect2(Point2(), p_texture->get_size())); -} - void AnimationTrackEdit::draw_texture_region_clipped(const Ref &p_texture, const Rect2 &p_rect, const Rect2 &p_region) { int clip_left = timeline->get_name_limit(); int clip_right = get_size().width - timeline->get_buttons_width(); diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 5e12791e34..3cb31fe21e 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -207,7 +207,6 @@ public: virtual void draw_fg(int p_clip_left, int p_clip_right); //helper - void draw_texture_clipped(const Ref &p_texture, const Vector2 &p_pos); void draw_texture_region_clipped(const Ref &p_texture, const Rect2 &p_rect, const Rect2 &p_region); void draw_rect_clipped(const Rect2 &p_rect, const Color &p_color, bool p_filled = true); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 975405aec4..eab1ecf373 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -691,11 +691,6 @@ void EditorData::set_edited_scene_version(uint64_t version, int p_scene_idx) { } } -uint64_t EditorData::get_edited_scene_version() const { - ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), 0); - return edited_scene[current_edited_scene].version; -} - uint64_t EditorData::get_scene_version(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), 0); return edited_scene[p_idx].version; diff --git a/editor/editor_data.h b/editor/editor_data.h index e4ef9f56a5..0d27e06987 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -190,7 +190,6 @@ public: void set_scene_path(int p_idx, const String &p_path); Ref