File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
include/rosbag2_transport Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -380,9 +380,10 @@ class Player : public rclcpp::Node
380380 size_t get_number_of_registered_on_play_msg_post_callbacks ();
381381
382382 // / \brief Getter for the first of the currently stored storage options
383- // / \return Reference to the first item in the StorageOptions vector
383+ // / \return Copy of the first item in the StorageOptions vector
384+ [[deprecated(" Use rosabg2_transport::Player::get_all_storage_options() instead" )]]
384385 ROSBAG2_TRANSPORT_PUBLIC
385- const rosbag2_storage::StorageOptions & get_storage_options ();
386+ rosbag2_storage::StorageOptions get_storage_options ();
386387
387388 // / \brief Getter for the currently stored storage options
388389 // / \return Copy of the currently stored storage options
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ class PlayerImpl
242242
243243 // / \brief Getter for the first of the currently stored storage options
244244 // / \return Copy of the first of the currently stored storage options
245- const rosbag2_storage::StorageOptions & get_storage_options ();
245+ rosbag2_storage::StorageOptions get_storage_options ();
246246
247247 // / \brief Getter for the currently stored storage options
248248 // / \return Copy of the currently stored storage options
@@ -2179,10 +2179,10 @@ void PlayerImpl::publish_clock_update(const rclcpp::Time & time)
21792179 }
21802180}
21812181
2182- const rosbag2_storage::StorageOptions & PlayerImpl::get_storage_options ()
2182+ rosbag2_storage::StorageOptions PlayerImpl::get_storage_options ()
21832183{
21842184 auto all_storage_options = get_all_storage_options ();
2185- if (all_storage_options.size () < 1 ) {
2185+ if (all_storage_options.empty () ) {
21862186 throw std::runtime_error (" Storage options not available." );
21872187 }
21882188 return all_storage_options[0 ];
@@ -2448,7 +2448,7 @@ size_t Player::get_number_of_registered_on_play_msg_post_callbacks()
24482448 return pimpl_->get_number_of_registered_on_play_msg_post_callbacks ();
24492449}
24502450
2451- const rosbag2_storage::StorageOptions & Player::get_storage_options ()
2451+ rosbag2_storage::StorageOptions Player::get_storage_options ()
24522452{
24532453 return pimpl_->get_storage_options ();
24542454}
You can’t perform that action at this time.
0 commit comments