src.ctf.fs: remove ctf_fs_ds_index_entry_create
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 6 Dec 2023 15:52:10 +0000 (15:52 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 17 Apr 2024 17:57:53 +0000 (13:57 -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>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12342
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/ctf/fs-src/data-stream-file.cpp

index 3eb3604e437e49ba4eff35e1381ef57e66f1ad99..10c21ec7c05175d0c0aab1a51000ba0d3b104801 100644 (file)
@@ -379,14 +379,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 bt2c::DataLen offset,
-                                                              const bt2c::DataLen packetSize)
-{
-    ctf_fs_ds_index_entry::UP entry = bt2s::make_unique<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,
@@ -531,7 +523,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 = bt2s::make_unique<ctf_fs_ds_index_entry>(offset, packetSize);
         if (!index_entry) {
             BT_CPPLOGE_APPEND_CAUSE_SPEC(ds_file->logger,
                                          "Failed to create a ctf_fs_ds_index_entry.");
@@ -690,7 +682,8 @@ static ctf_fs_ds_index::UP build_index_from_stream_file(struct ctf_fs_ds_file *d
             return nullptr;
         }
 
-        auto index_entry = ctf_fs_ds_index_entry_create(currentPacketOffset, currentPacketSize);
+        auto index_entry =
+            bt2s::make_unique<ctf_fs_ds_index_entry>(currentPacketOffset, currentPacketSize);
         if (!index_entry) {
             BT_CPPLOGE_APPEND_CAUSE_SPEC(ds_file->logger,
                                          "Failed to create a ctf_fs_ds_index_entry.");
This page took 0.025073 seconds and 4 git commands to generate.