File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,14 @@ String LinkedList::to_string() {
408408 return str;
409409}
410410
411+ void ListNode::erase () {
412+ if (data) {
413+ data->erase (this );
414+ } else {
415+ memdelete (this );
416+ }
417+ }
418+
411419void ListNode::_bind_methods () {
412420 ClassDB::bind_method (D_METHOD (" get_next" ), &ListNode::get_next);
413421 ClassDB::bind_method (D_METHOD (" get_prev" ), &ListNode::get_prev);
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class ListNode : public Object {
3939 Variant get_value () { return value; }
4040 void set_value (const Variant &p_value) { value = p_value; }
4141
42- void erase () { data ? data-> erase ( this ) : memdelete ( this ); }
42+ void erase ();
4343
4444 virtual String to_string () { return String (value); }
4545
You can’t perform that action at this time.
0 commit comments