From 843ca1d8ba0cbf01fb8c4ef515a8a6e9a4d31abc Mon Sep 17 00:00:00 2001 From: Michael Orlov Date: Tue, 7 May 2024 19:12:28 -0700 Subject: [PATCH] Delete redundant "should_split_bagfile" in compression_writer - It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov --- .../sequential_compression_writer.hpp | 4 ---- .../sequential_compression_writer.cpp | 13 ------------- 2 files changed, 17 deletions(-) diff --git a/rosbag2_compression/include/rosbag2_compression/sequential_compression_writer.hpp b/rosbag2_compression/include/rosbag2_compression/sequential_compression_writer.hpp index d1265848e..7a42426e0 100644 --- a/rosbag2_compression/include/rosbag2_compression/sequential_compression_writer.hpp +++ b/rosbag2_compression/include/rosbag2_compression/sequential_compression_writer.hpp @@ -206,10 +206,6 @@ class ROSBAG2_COMPRESSION_PUBLIC SequentialCompressionWriter // Closes the current backed storage and opens the next bagfile. void split_bagfile() override; - // Checks if the current recording bagfile needs to be split and rolled over to a new file. - bool should_split_bagfile( - const std::chrono::time_point & current_time); - // Prepares the metadata by setting initial values. void init_metadata() override; }; diff --git a/rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp b/rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp index 021496ebf..ce0776886 100644 --- a/rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp +++ b/rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp @@ -439,17 +439,4 @@ void SequentialCompressionWriter::write( } } -bool SequentialCompressionWriter::should_split_bagfile( - const std::chrono::time_point & current_time) -{ - if (storage_options_.max_bagfile_size == - rosbag2_storage::storage_interfaces::MAX_BAGFILE_SIZE_NO_SPLIT) - { - return false; - } else { - std::lock_guard lock(storage_mutex_); - return SequentialWriter::should_split_bagfile(current_time); - } -} - } // namespace rosbag2_compression