From 590a6814dd8c52af633e74d281930af38942532d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano-Tarumi?= Date: Tue, 6 Nov 2018 20:48:13 -0500 Subject: [PATCH] delete free_tags, now useless thanks to RAII --- src/opus.cc | 7 ------- src/opustags.cc | 1 - src/opustags.h | 1 - t/unit.cc | 3 --- 4 files changed, 12 deletions(-) diff --git a/src/opus.cc b/src/opus.cc index 28fa397..de5f72f 100644 --- a/src/opus.cc +++ b/src/opus.cc @@ -143,10 +143,3 @@ void ot::print_tags(opus_tags *tags) puts(""); } } - -/** - * \todo Delete this function. - */ -void ot::free_tags(opus_tags *tags) -{ -} diff --git a/src/opustags.cc b/src/opustags.cc index d79045f..666c09c 100644 --- a/src/opustags.cc +++ b/src/opustags.cc @@ -300,7 +300,6 @@ int main(int argc, char **argv){ } else ot::print_tags(&tags); - ot::free_tags(&tags); if(raw_tags) free(raw_tags); if(error || !out) diff --git a/src/opustags.h b/src/opustags.h index f24e14d..0aad0fd 100644 --- a/src/opustags.h +++ b/src/opustags.h @@ -79,7 +79,6 @@ int render_tags(opus_tags *tags, ogg_packet *op); void delete_tags(opus_tags *tags, const char *field); int add_tags(opus_tags *tags, const char **tags_to_add, uint32_t count); void print_tags(opus_tags *tags); -void free_tags(opus_tags *tags); /** \} */ diff --git a/t/unit.cc b/t/unit.cc index d582411..4b60659 100644 --- a/t/unit.cc +++ b/t/unit.cc @@ -56,7 +56,6 @@ static bool parse_standard() throw failure("bad artist"); if (tags.extra_data.size != 0) throw failure("found mysterious padding data"); - ot::free_tags(&tags); return true; } @@ -82,7 +81,6 @@ static bool recode_standard() throw failure("the packet is not the right size"); if (memcmp(packet.packet, standard_OpusTags, packet.bytes) != 0) throw failure("the rendered packet is not what we expected"); - ot::free_tags(&tags); free(packet.packet); return true; } @@ -109,7 +107,6 @@ static bool recode_padding() throw failure("the packet got too big"); if (memcmp(packet.packet, padded_OpusTags.data(), packet.bytes) != 0) throw failure("the rendered packet is not what we expected"); - ot::free_tags(&tags); free(packet.packet); return true; }