diff options
author | David Robillard <d@drobilla.net> | 2022-08-09 21:51:53 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-12 01:05:15 -0400 |
commit | 541e57f889e297af350b38e4e8fc68d45cd35081 (patch) | |
tree | f307ac3b4d489321e695191d1ed3f0829b1810b2 /test/.clang-tidy | |
parent | 6c4d95faca8b46ffa6352515293765b0e3b93bce (diff) | |
download | zix-541e57f889e297af350b38e4e8fc68d45cd35081.tar.gz zix-541e57f889e297af350b38e4e8fc68d45cd35081.tar.bz2 zix-541e57f889e297af350b38e4e8fc68d45cd35081.zip |
Simplify ring space calculations
It isn't necessary to branch here to avoid underflow. Essentially, the way
that unsigned binary integers work "automatically" does what this code was
doing.
Note that these expressions only work for a ring buffer that, like this one,
has a power of 2 (real) size and a maximum capacity 1 less than that.
Diffstat (limited to 'test/.clang-tidy')
0 files changed, 0 insertions, 0 deletions