From 2db013e027d09790e4143fd5eb045de590f50e4c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 9 Jun 2022 10:27:25 -0400 Subject: [PATCH] src.ctf.fs: remove ctf_fs_ds_group_medops_data_destroy Remove it, simply delete `data` in the custom deleter. Note that we still use a custom deleter because ctf_fs_ds_group_medops_data is in the .cpp file, and therefore not visible to other compilation units. We could move it to the .hpp to avoid this, but it's going to be removed soon anyway, so it's not worth it. Change-Id: Ib5741e0e0a535cb84b2a4e27ff6ff9620eaaebce Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/8273 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/12311 Tested-by: jenkins --- src/plugins/ctf/fs-src/data-stream-file.cpp | 14 +------------- src/plugins/ctf/fs-src/data-stream-file.hpp | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/plugins/ctf/fs-src/data-stream-file.cpp b/src/plugins/ctf/fs-src/data-stream-file.cpp index 73d4751b..caad4b58 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.cpp +++ b/src/plugins/ctf/fs-src/data-stream-file.cpp @@ -377,21 +377,9 @@ end: return status; } -void ctf_fs_ds_group_medops_data_destroy(struct ctf_fs_ds_group_medops_data *data) -{ - if (!data) { - goto end; - } - - delete data; - -end: - return; -} - void ctf_fs_ds_group_medops_data_deleter::operator()(ctf_fs_ds_group_medops_data *data) noexcept { - ctf_fs_ds_group_medops_data_destroy(data); + delete data; } enum ctf_msg_iter_medium_status ctf_fs_ds_group_medops_data_create( diff --git a/src/plugins/ctf/fs-src/data-stream-file.hpp b/src/plugins/ctf/fs-src/data-stream-file.hpp index d5db8cfc..b9e37198 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.hpp +++ b/src/plugins/ctf/fs-src/data-stream-file.hpp @@ -196,6 +196,4 @@ ctf_fs_ds_group_medops_data_create(struct ctf_fs_ds_file_group *ds_file_group, void ctf_fs_ds_group_medops_data_reset(struct ctf_fs_ds_group_medops_data *data); -void ctf_fs_ds_group_medops_data_destroy(struct ctf_fs_ds_group_medops_data *data); - #endif /* CTF_FS_DS_FILE_H */ -- 2.34.1