Remove ctf_fs_ds_index_destroy and ctf_fs_ds_index_deleter, since
ctf_fs_ds_index objects can simply be deleted now.
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: I64eb93eb3f06174523e7f9ceaf94cf103a9e69eb
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8255
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12293
ctf_fs_ds_index::UP ctf_fs_ds_index_create()
{
- return ctf_fs_ds_index::UP {new ctf_fs_ds_index};
+ return bt2s::make_unique<ctf_fs_ds_index>();
}
void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *ds_file)
delete ds_file;
}
-void ctf_fs_ds_index_destroy(struct ctf_fs_ds_index *index)
-{
- if (!index) {
- return;
- }
-
- delete index;
-}
-
-void ctf_fs_ds_index_deleter::operator()(ctf_fs_ds_index * const index) noexcept
-{
- ctf_fs_ds_index_destroy(index);
-}
-
ctf_fs_ds_file_info::UP ctf_fs_ds_file_info_create(const char *path, int64_t begin_ns)
{
ctf_fs_ds_file_info::UP ds_file_info = bt2s::make_unique<ctf_fs_ds_file_info>();
uint64_t packet_seq_num = 0;
};
-struct ctf_fs_ds_index_deleter
-{
- void operator()(struct ctf_fs_ds_index *index) noexcept;
-};
-
struct ctf_fs_ds_index
{
- using UP = std::unique_ptr<ctf_fs_ds_index, ctf_fs_ds_index_deleter>;
+ using UP = std::unique_ptr<ctf_fs_ds_index>;
std::vector<ctf_fs_ds_index_entry::UP> entries;
};
ctf_fs_ds_index::UP ctf_fs_ds_index_create();
-void ctf_fs_ds_index_destroy(struct ctf_fs_ds_index *index);
-
ctf_fs_ds_file_info::UP ctf_fs_ds_file_info_create(const char *path, int64_t begin_ns);
ctf_fs_ds_file_group::UP ctf_fs_ds_file_group_create(struct ctf_fs_trace *ctf_fs_trace,