src.ctf.fs: remove ctf_fs_ds_index_entry_create
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 13 Jun 2022 16:49:45 +0000 (12:49 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 23 Aug 2022 16:06:16 +0000 (12:06 -0400)
This function is now a simple wrapper around constructing a
ctf_fs_ds_index_entry, remove it.

Change-Id: I20905864876588f7e6db79b6b344833275131871
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8347
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/fs-src/data-stream-file.cpp

index 5da9b9d04be2927cf8ba9cc40fd02ca0fd8611ee..f9081615a8c6bc8bccf082ba072bcffc1e84d9f7 100644 (file)
@@ -393,15 +393,6 @@ struct ctf_msg_iter_medium_ops ctf_fs_ds_group_medops = {
     .borrow_stream = medop_group_borrow_stream,
 };
 
-static ctf_fs_ds_index_entry::UP ctf_fs_ds_index_entry_create(const bt2_common::DataLen offset,
-                                                              const bt2_common::DataLen packetSize)
-{
-    ctf_fs_ds_index_entry::UP entry =
-        bt2_common::makeUnique<ctf_fs_ds_index_entry>(offset, packetSize);
-
-    return entry;
-}
-
 static int convert_cycles_to_ns(struct ctf_clock_class *clock_class, uint64_t cycles, int64_t *ns)
 {
     return bt_util_clock_cycles_to_ns_from_origin(cycles, clock_class->frequency,
@@ -539,7 +530,7 @@ static ctf_fs_ds_index::UP build_index_from_idx_file(struct ctf_fs_ds_file *ds_f
             return nullptr;
         }
 
-        index_entry = ctf_fs_ds_index_entry_create(offset, packetSize);
+        index_entry = bt2_common::makeUnique<ctf_fs_ds_index_entry>(offset, packetSize);
         if (!index_entry) {
             BT_CLOGE_APPEND_CAUSE("Failed to create a ctf_fs_ds_index_entry.");
             return nullptr;
@@ -693,7 +684,8 @@ static ctf_fs_ds_index::UP build_index_from_stream_file(struct ctf_fs_ds_file *d
             return nullptr;
         }
 
-        index_entry = ctf_fs_ds_index_entry_create(currentPacketOffset, currentPacketSize);
+        index_entry =
+            bt2_common::makeUnique<ctf_fs_ds_index_entry>(currentPacketOffset, currentPacketSize);
         if (!index_entry) {
             BT_CLOGE_APPEND_CAUSE("Failed to create a ctf_fs_ds_index_entry.");
             return nullptr;
This page took 0.027164 seconds and 5 git commands to generate.