Skip to content

Commit

Permalink
Silence an annoying unreachable out of bounds warning
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jul 7, 2023
1 parent 9378115 commit 4958759
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/engine/Port.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ struct Port {
}
// Set higher channel voltages to 0
for (int c = channels; c < this->channels; c++) {
if (c >= PORT_MAX_CHANNELS)
__builtin_unreachable();
voltages[c] = 0.f;
}
// Don't allow caller to set port as disconnected
Expand Down

0 comments on commit 4958759

Please sign in to comment.