Skip to content

Commit

Permalink
cast get_state() to unsigned int for comparisons with masks
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-mihir committed Jul 31, 2024
1 parent 8abb138 commit 873c6ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal_modules/roc_pipeline/state_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bool StateTracker::wait_state(unsigned state_mask, core::nanoseconds_t deadline)
return true;
}

if (get_state() & state_mask) {
if (static_cast<unsigned>(get_state()) & state_mask) {
waiting_mask_ = 0;
return true;
}
Expand Down Expand Up @@ -140,7 +140,7 @@ void StateTracker::unregister_packet() {
}

void StateTracker::signal_state_change() {
if (waiting_mask_ != 0 && (get_state() & waiting_mask_)) {
if (waiting_mask_ != 0 && (static_cast<unsigned>(get_state()) & waiting_mask_)) {
sem_.post();
}
}
Expand Down

0 comments on commit 873c6ff

Please sign in to comment.