Skip to content

Commit

Permalink
Address a couple nitpicks
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
  • Loading branch information
emersonknapp committed Sep 13, 2021
1 parent 3ca8350 commit 55beff6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ class ROSBAG2_CPP_PUBLIC SequentialWriter
void write(std::shared_ptr<rosbag2_storage::SerializedBagMessage> message) override;

/**
* Take a snapshot by triggering a circular buffer flip, writing data to rosbag,
* closing the rosbag, and opening a new one.
* Take a snapshot by triggering a circular buffer flip, writing data to disk.
* *\returns true if snapshot is successful
*/
bool take_snapshot() override;
Expand Down
4 changes: 1 addition & 3 deletions rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,9 @@ void SequentialWriter::write(std::shared_ptr<rosbag2_storage::SerializedBagMessa
// If cache size is set to zero, we write to storage directly
storage_->write(converted_msg);
++topic_information->message_count;
} else if (use_cache_) {
} else {
// Otherwise, use cache buffer
message_cache_->push(converted_msg);
} else if (storage_options_.snapshot_mode) {
message_cache_->push(converted_msg);
}
}

Expand Down

0 comments on commit 55beff6

Please sign in to comment.