return nonstd::nullopt;
}
- ctf_fs_ds_index_entry index_entry {offset, packetSize};
-
- /* Set path to stream file. */
- index_entry.path = file_info->path.c_str();
-
+ ctf_fs_ds_index_entry index_entry {file_info->path.c_str(), offset, packetSize};
index_entry.timestamp_begin = be64toh(file_index->timestamp_begin);
index_entry.timestamp_end = be64toh(file_index->timestamp_end);
if (index_entry.timestamp_end < index_entry.timestamp_begin) {
return nonstd::nullopt;
}
- ctf_fs_ds_index_entry index_entry {currentPacketOffset, currentPacketSize};
-
- /* Set path to stream file. */
- index_entry.path = file_info->path.c_str();
+ ctf_fs_ds_index_entry index_entry {file_info->path.c_str(), currentPacketOffset,
+ currentPacketSize};
int ret = init_index_entry(index_entry, ds_file, &props);
if (ret) {
struct ctf_fs_ds_index_entry
{
- ctf_fs_ds_index_entry(bt2_common::DataLen offsetParam, bt2_common::DataLen packetSizeParam) :
- offset(offsetParam), packetSize(packetSizeParam)
+ ctf_fs_ds_index_entry(const char *pathParam, bt2_common::DataLen offsetParam,
+ bt2_common::DataLen packetSizeParam) :
+ path {pathParam},
+ offset {offsetParam}, packetSize {packetSizeParam}
{
}
/* Weak, belongs to ctf_fs_ds_file_info. */
- const char *path = nullptr;
+ const char *path;
/* Position of the packet from the beginning of the file. */
bt2_common::DataLen offset;