Skip to content

Commit

Permalink
libebml2: remove EBML_MasterRemove()
Browse files Browse the repository at this point in the history
Deleting a node does remove it from its parent element.
  • Loading branch information
robUx4 committed Jan 2, 2025
1 parent 30e52f8 commit 9ea5973
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion libebml2/ebml2/ebml.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ EBML_DLL void EBML_ElementForceDataSize(ebml_element *Element, filepos_t Size);
// type specific routines
EBML_DLL ebml_element *EBML_MasterFindFirstElt(ebml_master *Element, const ebml_context *Context, bool_t bCreateIfNull, bool_t SetDefault, int ForProfile);
EBML_DLL err_t EBML_MasterAppend(ebml_master *Element, ebml_element *Append);
EBML_DLL err_t EBML_MasterRemove(ebml_master *Element, ebml_element *Remove);
EBML_DLL ebml_element *EBML_MasterFindNextElt(ebml_master *Element, const ebml_element *Current, bool_t bCreateIfNull, bool_t SetDefault, int ForProfile);
EBML_DLL ebml_element *EBML_MasterAddElt(ebml_master *Element, const ebml_context *Context, bool_t SetDefault, int ForProfile);
EBML_DLL size_t EBML_MasterCount(const ebml_master *Element);
Expand Down
8 changes: 0 additions & 8 deletions libebml2/ebmlmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ err_t EBML_MasterAppend(ebml_master *Element, ebml_element *Append)
return Result;
}

err_t EBML_MasterRemove(ebml_master *UNUSED_PARAM(Element), ebml_element *Append)
{
err_t Result = NodeTree_SetParent(Append,NULL,NULL);
return Result;
}

size_t EBML_MasterCount(const ebml_master *Element)
{
size_t Result = 0;
Expand Down Expand Up @@ -638,7 +632,6 @@ void EBML_MasterCheckContext(ebml_master *Element, int ProfileMask, bool_t (*Err
Node_FromStr(Element,ClassString,TSIZEOF(ClassString),s->eClass->ElementName);
if (ErrCallback && ErrCallback(cookie,MASTER_CHECK_PROFILE_INVALID,ClassString,i))
{
EBML_MasterRemove(Element,i); // make sure it doesn't remain in the list
NodeDelete((node*)i);
i=EBML_MasterChildren(Element);
break;
Expand All @@ -649,7 +642,6 @@ void EBML_MasterCheckContext(ebml_master *Element, int ProfileMask, bool_t (*Err
Node_FromStr(Element,ClassString,TSIZEOF(ClassString),s->eClass->ElementName);
if (ErrCallback && ErrCallback(cookie,MASTER_CHECK_MULTIPLE_UNIQUE,ClassString,SubElt))
{
EBML_MasterRemove(Element,i); // make sure it doesn't remain in the list
NodeDelete((node*)i);
i=EBML_MasterChildren(Element);
break;
Expand Down
1 change: 0 additions & 1 deletion mkclean/mkclean.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ static void UpdateCues(ebml_master *Cues, ebml_master *Segment)
NextCue =(ebml_master*)EBML_MasterNext(Cue);
if (MATROSKA_CuePointUpdate((matroska_cuepoint*)Cue, (ebml_element*)Segment, DstProfile)!=ERR_NONE)
{
EBML_MasterRemove(Cues,(ebml_element*)Cue); // make sure it doesn't remain in the list
NodeDelete((node*)Cue);
}
}
Expand Down

0 comments on commit 9ea5973

Please sign in to comment.