Skip to content

Commit e8d394d

Browse files
committed
use is_empty
1 parent 38f75ee commit e8d394d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FileEngine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void FileEngine::begin_sub_transaction()
169169
}
170170

171171
// We have publishers on that stream, wait for them to complete a transaction first
172-
if (get_publishers().count() > 0) {
172+
if (not get_publishers().is_empty()) {
173173
std::unique_lock lock(*get_subscribers().get_mutex());
174174
while (completed_pub_transaction_id_ < current_sub_transaction_id_) {
175175
XBT_DEBUG("Wait for publishers to end the transaction I need");
@@ -186,7 +186,7 @@ void FileEngine::end_sub_transaction()
186186

187187
// The files subscribers need to read may not have been fully written. Wait to be notified completion of the publish
188188
// activities
189-
if (current_sub_transaction_id_ == current_pub_transaction_id_ && get_publishers().count() > 0) {
189+
if (current_sub_transaction_id_ == current_pub_transaction_id_ && not get_publishers().is_empty()) {
190190
XBT_DEBUG("Wait for the completion of publish activities from the current transaction");
191191
pub_activities_completed_->wait(std::unique_lock(*get_subscribers().get_mutex()));
192192
XBT_DEBUG("All on-flight publish activities are completed. Proceed with the subscribe activities.");

0 commit comments

Comments
 (0)